I have a Robocopy command that is exiting with a retry limit exceeded error after X retries when a file is locked despite me using the /R & /W switches.
Behaviour I expected: From reading the documentation (robocopy /?), I expected /R:X to determine the number of retries (which it does), /W:X determines the wait time (which it does) and then after these conditions are matched, the command will move on to the next file and not exit.
Behaviour I am seeing: Using /R:3 /W:1 I am seeing 3 retries with a 1 second delay and then the process ends with: ERROR: RETRY LIMIT EXCEEDED
The command:
robocopy "D:\SOURCE\XPP" "\\DEST\RoboCopy-Daily-Backup" /MIR /Z /R:3 /W:1 /LOG:"D:\Robocopy.log" /NP /NDL
This will output 3 x
Waiting 1 seconds... Retrying...
New File 9312
<rather long path to file\filename>
The process cannot access the file because it is being used by another process.
And then a:
ERROR: RETRY LIMIT EXCEEDED.
And the command ends with the usual table of stats rather than skipping this file and moving on to the next.
I've checked the docs again and can't where I've gone wrong and am sure that it used to work as expected.
Thanks.