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?


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.

  • 2
    +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
  • 5
    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

My One worked as below:

ROBOCOPY \Source \Destination *.pst /SEC /S /B /R:2 /W:2 > C:\temp\robocopy.log


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.

  • Does it solve the problem of skipping open files? – Ladadadada Jul 1 '13 at 10:48

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.