PDA

View Full Version : dos xcopy


tbalazs
07-26-2001, 10:53 AM
Under Win2K, does anyone know whether it's possible to do an xcopy so that *only* files which don't exist in the destination folder get copied? (Opposite of the /U switch).
Thanks.
Tony.

Paleo Pete
07-27-2001, 06:31 AM
Usually either copy or xcopy will ask if you want to overwrite existing files when it finds you are trying to copy something that's already there. to make sure it does, the /-y switch can be used.

xcopy syntax (http://www.computerhope.com/xcopyhlp.htm#03)

------------------
YOU! Out of the gene pool!
Note: Please post your questions on the forums, not in my email.

Computer Information Links (http://www.geocities.com/paleopete/)

tbalazs
07-27-2001, 06:43 AM
But I only want to copy files that *don't* exist in the target dir.

iisbob
07-27-2001, 06:54 AM
? the command that Pete showed you does excatly what you're asking, when you copy a directory and it comes upon a file you've already got in the destination it will ask if you wish to copy over this file or ignore it. This allows you to add newer files to the destination without corrupting the older ones.

if you want to addspecific files, then you'll have to name them individually as you copy them.

------------------
iisbob
"Soap and education are not as sudden as a massacre, but they are more deadly in the long run."

tbalazs
07-27-2001, 06:58 AM
Yes, sorry. What I haven't made clear is that I want the process to run automatically (e.g. in a batch file).