Does ROBOCOPY /XN exclude files that are newer in the SOURCE or files that are newer in the destination?

I checked Microsoft official documentation but it is totally ambiguous.


It appears that the Robocopy /XN switch excludes files that are newer in the source from being copied to the destination directory. So if there is a newer file in the source folder than what is in the destination folder and you use the /XN parameter, then the file(s) will not be copied to the destination folder—I tested and confirmed that this is the case by simply testing it from a test folder with older and newer files of the same file name so that's how I confirmed.

Further Resources

  • Robocopy /?
    • /XN :: eXclude Newer files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.