batch-filecmdxcopyrobocopy

Robocopy, xCopy or other solution?


I need to a way to update all files in a destination folder and its sub-directories with files in a single source folder.

Source : File A, File B, File C
Destination : File A, Destination->SubFolder : File B

It needs to update File A and File B in their dest folder and also ignore File C as it does not exist anywhere in dest.

Is this possible with xcopy or robocopy or is there another tool that will do the job? I've been having a play bit can't figure it out.

Thanks in advance.


Solution

  • robocopy will definitely help you out. While it doesn't sound like you can straight merge the source and destination outright (source sounds flat while the destination has some hierarchy), it has commands for copying entire folders and not copying if destination files aren't there.