Created
September 28, 2016 14:47
-
-
Save aromig/19871c003952b04f6c78299b816e98b7 to your computer and use it in GitHub Desktop.
Robocopy - Exclude Existing Files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
/xn Source directory files newer than the destination are excluded from the copy.