Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Xcopy question

Status
Not open for further replies.

edelwater

Programmer
Jun 29, 2000
203
EU
I wrote a perl file which output a batch file with only xcopy (file) commands (by checking on -d).

However when running:

xcopy /i /y /r /S

for each file it prompts if it is a (f)ile or (d)irectory it should be copying. this is very irritating since i want to run it automatically.

Is there a xcopy /something which skips the question (f)ile or (d)irectory?






--
 
It would be good to see the commands in the batch file. From the sounds of things, you didn't construct the batch file properly. That message usually appears when you don't specify an existing directory to copy to.

You might also want to look into robocopy.
 
I agree with lwcomputing. The "/I" switch should make the presumptive choice for you.
 
These single lines are all thats in the batchfile:

echo f|xcopy /i /y /r /S x:/1/22/3/test.txt z:/temp/1/22/3/test.txt

but the source is a ClearCase (UCM) directory so it probably doesnt get this information through.

tanx.

--
 
Try:

xcopy x:\1\22\3\test.txt z:\temp\1\22\3\test.txt /i/y/r/s

The /i defines the destination as a folder.

And report back. I do not like the improper backslashes either in a command that uses parameters, so I changed them as seen above.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top