Software >> OS >> Windows >> How to use robocopy to copy new files only


 

Use robocopy.exe from windows resource kit.  

robocopy sourcepath destinationpath /E /XO /XN  

note:   

/E   Copies subdirectories as well as files including empty dirs

/XO  Exclude old files i.e. files on source that also exist at the destination
     but has older or same timestamp.   

/XN  Exclude newer files i.e. files on source that also exist at the destination
     but has newer timestamp.

The net effect is that only files that don't exist at the destination will be copied.