Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

We are using Robocopy to redistribute files which arrive via FTP in a drop folder. Ideally we want Robocopy to leave files alone if they are still being FTPd.

Having tried various switches, Robocopy still copies the open files. It doesn't delete them, so the FTP continues unaffected. However, we end up with truncated files being distributed to their destination.

Can Robocopy be made to skip open files?

Perhaps there is something more suitable than Robocopy for this task?

share|improve this question

Have you tried using the /R and /W switches?

Something like:

/R:2 /W:2 

This means retry twice wait 2 secs to retry. If the file is still open after the two attempts, the file will be skipped. Depending on your needs you could lower it to /R:1 /W:1.

share|improve this answer
+1 - These are pretty much mandatory options if you want your robocopy to actually complete. – MDMarra Nov 1 '12 at 15:05
Shouldn't the /B and /Z switches be used here? – pauska Nov 1 '12 at 15:06
Thanks to pauska for the suggestion of the /B switch (backup mode). This tries to reset the archive bit on the file and so fails when the file is open. A combination of /B and /R /W is what worked for me in the end: robocopy ./test2 ./test1 /B /W:0 /R:0 – domspurling Nov 30 '12 at 12:37

I use copyrite as it takes all the BS CLI stuff out of the equation. It's a gui that allows one to point and click a robocopy job.

share|improve this answer
Does it solve the problem of skipping open files? – Ladadadada Jul 1 '13 at 10:48

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.