I'm trying to find the best Robocopy commands for each situation I can think of, such as copying a folder that includes the weirdest files (such as the Windows folder), or a Windows User's folder, etc.

What are the best "retries" and "wait times between retries" numbers to use (switches /R: and /W:)?

I'm thinking of:

/R:3 /W:1 (vs the default 1million /R:1 million, /W:30 seconds)

I mean, why wait more than one second between retries?, the default is 30 seconds, why so? I guess this is intended for hard drives so the drive heads move around between reattempts?.

...then if more reattempts are needed (by looking at the log and finding errors due to bad sectors or similar), you can change the switches and try again.

  • I basically always set retries and waiting to 1. 1 retry and 1 second. That seems to work best for me.
    – LPChip
    May 27 at 14:58
  • 1
    If you are on an RFC1149 compliant network then you may need to set timeouts significantly longer than the defaults. The defaults are typically there to cover the vast majority of situations including networks that cross major boundaries which add latency or may have slow links. Some antivirus tools may also impose delays writing or reading while they scan files. I know that they are "meant" to be transparent, but I've found files that are clean but some antivirus literally chokes hard on for 30 or more seconds, and many tools tend to time out wating for the antivirus to finish.
    – Mokubai
    May 27 at 15:35
  • 1
    The point I was making is to echo Albins answer. The only way to know what defaults work for you is to test it and find out. Your network and computers and the data you are copying are going to be the key things that affect your chosen defaults and there isn't really any "best" setting. You might be fine with no retries and a 0.1 second timeout, or you might need 50 retries and a 1000 second timeout due to a network that has a link that drops packets and is slow to get responses over.
    – Mokubai
    May 27 at 15:55
  • Superthanks Albin and Mokubai, great answers. Good to learn that a file gets locked while being used by some process, which I didn't know :-)) Jun 3 at 8:41

There is no general answer for this issue. It depends on the specific situation. If you copy within one system between memory on the same bus retries are unnecessary. If you work within a network environment which is preforming badly you'll set a high (enough) retry time. Same goes for the number of retries.

You have to "exactly" specify each situation, there is no general answer to this question.

Since you are probable looking at regular Windows Systems with HDs/SSDs I would say skip the retries altogether. It's very seldom that a e.g. locked file gets unlocked on the second or third try (and if it does you are just lucky that the other process finish in exactly this moment)... unless you have a very specific problem which is solved by 3 retries... as I said, no general answer.

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.