Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to use robocopy to copy only the files that do not exist in destination?

robocopy has a /is (include same files) switch. What I am looking for is an /xs switch. If a file exists in both the source and the destination I don't want it to be copied. The criteria is file name only, regardless of modified day, size, etc. For example, even if the source has a newer file (based on modified date) than the same file in the destination, I don't want it to be copied. Possible to do this? Thanks.

share|improve this question

Just use the /xc (exclude changed) /xn (exclude newer) and /xo (exclude older) flags:

robocopy /xc /xn /xo source destination 
share|improve this answer
That does not work (at least if you have other options as well - i.e. /b /e /copyall). Robocopy looks at timestamp and I believe even if the last accessed time stamp is different, it will copy. If there is a way, would love to know about it. – user174865 Nov 21 '12 at 2:49
The /xn and /xo options should prevent robocopy from copying because of a different timestamp. Worked fine when I tested it. Robocopy does not pay attention to the last accessed timestamp. Your answer will probably be removed (because it isn't an answer) but you can email me if you want to discuss this. – Harry Johnston Nov 21 '12 at 3:41
works perfectly. Thanks! – Valamas May 1 '13 at 22:03
Use /FFT if you copy between different filesystems (NTFS, FAT). It should prevent Robocopy from thinking that a file is older/newer while it is actually the same date and time. – Martin Oct 22 '14 at 9:44

If you're copying from left to right, you want to only copy orphaned files on the left to the right side.

I use a pay tool called Beyond Compare that handles these type of scenarios. RoboCopy is great for mapped drives or even UNC paths, but my two use cases involves:

  • FTP to copy new files to my web site
  • move/archive files to DropBox

That, I unfortunately can not do with RoboCopy.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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