Question Xcopy question

Craig234

Distinguished
Apr 23, 2006
371
5
18,795
How do I specify for an xcopy to copy only files that haven't already been copied, i.e., to treat it like I said 'no' to overwrite each file?
 
D

Deleted member 14196

Guest

You can’t. You will need synchronizing, software, or back up software.
 
Last edited by a moderator:
you can use the /d command.

Xcopy /D:dd-mm-yyyy C:\source E:\destination

/d [:MM-DD-YYYY] Copies source files changed on or after the specified date only. If you do not include a MM-DD-YYYY value, xcopy copies all source files that are newer than existing destination files. This command-line option allows you to update files that have changed.
 
Last edited:
The file system doesn't know if a file have been copied once or evan many times.
A backup program or any copy function can see if the file/s you are copying, already exist on the target drive/folder. Hence it can suggest to only copy non existing files on the target, or only files with a newer date/time.
 

Craig234

Distinguished
Apr 23, 2006
371
5
18,795
Yikes, I hadn't said thanks yet to faalin. That worked for the question I asked.

Now I'm finding I still don't have quite what I want.

I want to copy a directory and its subdirectories to a backup drive. It works without subdirectories.

But /s is supposed to add subdirectories, but copy *.* dest:\backupdir /d /s gets an error.

Also one variation I tried was getting overwrite confirmation prompts, this shouldn't be overwriting?