Skip to content

Instantly share code, notes, and snippets.

View aromig's full-sized avatar
🐧
• • • • • •

Adam Romig aromig

🐧
• • • • • •
View GitHub Profile
@aromig
aromig / robocopy_exclude_existing_files.cmd
Created September 28, 2016 14:47
Robocopy - Exclude Existing Files
robocopy c:\Sourcepath c:\Destpath /E /XC /XN /XO
:: /E makes Robocopy recursively copy subdirectories, including empty ones.
:: /XC excludes existing files with the same timestamp, but different file sizes. Robocopy normally overwrites those.
:: /XN excludes existing files newer than the copy in the source directory. Robocopy normally overwrites those.
:: /XO excludes existing files older than the copy in the source directory. Robocopy normally overwrites those.
:: With the Changed, Older, and Newer classes excluded, Robocopy will exclude files existing in the destination directory.