Can Robocopy be made to skip open files

robocopywindows-server-2003

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?

Best Answer

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.

Related Topic