Can Robocopy be made to skip open files?
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.
My One worked as below:
ROBOCOPY \Source \Destination *.pst /SEC /S /B /R:2 /W:2 > C:\temp\robocopy.log