I’ve been using Xcopy to backup a folder to which I’ve been adding files. But now I am also deleting files, but Xcopy doesn’t seem to care. How do I get them removed from the backup?
did the answers provided above solve your question? Please let us know. Thank you!
Hello, would not it be easier to exclude the files from the backup to begin with?
From what I know xcopy does not have the option to identify files deleted from the source and removing them from the destination.
For stuff like that you may want to look into Robocopy or Richcopy.
However you have to understand one important point:
By automatically removing files from the destination that have been deleted from the source you are turning your current backup solution into a simple clone!
A backup is meant to contain files that may have been deleted from the source. If it didn't it wouldn't be a viable backup method.
You should rather look into an option that deletes those [no longer existing] backed up files after a certain period of time e.g. if the original file has been deleted more than 30 days ago.
Just imagine you deleted the entire content by accident and xcopy (or whatever solution you are using) would delete them from the backup location. That simply doesn't make sense for a backup.