UNC Path: Robocopy: /R:100 /W:3 Confusion


  1. Posts : 331
    windows 10
       #1

    UNC Path: Robocopy: /R:100 /W:3 Confusion


    " /R:100 /W:3" comes up without definition in Robocopy demos:

    "robocopy c:\temp\source c:\temp\destination /MIR /COPYALL /DCOPYAT /R:100 /W:3".

    I sort of have the gist of what is going on?

    Need I worry about this?

    When using Robocopy to move data from one drive to another in my home computer do I need to set up a UNC path?

    If so how do I establish a connection a UNC Path in my Robocopy files, the example above.

    Thanks for any thoughts.
      My Computer


  2. Posts : 31,839
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #2

    mikeincousa said:
    " /R:100 /W:3" comes up without definition in Robocopy demos...
    ...I sort of have the gist of what is going on? Need I worry about this?
    /R:100 specifies 100 retries before giving up trying to copy a locked file and moving to the next file. /W:3 says wait 3 seconds between retries. If you don't specify these the defaults are 1 million retries, waiting 30 second between each. Basically if there's a file in use that cannot be copied you'll get stuck on retrying it forever (30 million seconds is almost a year).

    UNC Path: Robocopy: /R:100 /W:3 Confusion-image.png

    When using Robocopy to move data from one drive to another in my home computer do I need to set up a UNC path?
    If so how do I establish a connection a UNC Path in my Robocopy files, the example above.

    Robocopy can use UNC paths or drive letters as the source and/or destination. If it's just to a local drive on your computer it's probably more convenient to use drive letters. UNC paths are useful if the destination is a share on another computer. If a path includes a space, then put it in quotes.

    UNC Path: Robocopy: /R:100 /W:3 Confusion-image.png

    robocopy c:\temp\source "\\server name\share name\destination" /MIR /COPYALL /DCOPY:DAT /R:100 /W:3

    Type RoboCopy /? to see the full help.
      My Computers


  3. Posts : 331
    windows 10
    Thread Starter
       #3

    Thanks for you response, It is very helpful for me.

    So, if I have you right, one would not, hypothetically, use /R:n and /W:n in the same run under any circumstances>

    Question:
    Hypothetically, If I had a very large file in the middle of a transfer with tons and tons and tons of small folders and files without using /W:n all that would happen is the transfer will just slow down? Just like I move files in Windows for such tasks now?



    Thanks again.
      My Computer


  4. Posts : 31,839
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #4

    mikeincousa said:
    Thanks for you response, It is very helpful for me.

    So, if I have you right, one would not, hypothetically, use /R:n and /W:n in the same run under any circumstances...
    You should always use /R:n and /W:m switches and use small values for n and m. If you don't then you run the risk of stalling at copying a file that is open in an app, locked, and thus cannot be copied while it is open. A small value for retries and waiting will ensure RoboCopy will not wait too long before it skips trying to copy that file. By default RoboCopy will retry a million times, waiting 30 seconds between retries.

    Question:
    Hypothetically, If I had a very large file in the middle of a transfer with tons and tons and tons of small folders and files without using /W:n all that would happen is the transfer will just slow down? Just like I move files in Windows for such tasks now?
    /W:n would have no effect on the speed of copying multiple files, it just specifies the time to wait between retries, should a file be locked. What may speed up copying is the /MT switch that will enable multithreaded copying. More here:

    How to use Robocopy multi-threaded feature to speed up file copy on Windows 10 - Pureinfotech
      My Computers


  5. Posts : 331
    windows 10
    Thread Starter
       #5

    Okay, Thanks. I thing have it save for my next sentence

    :You should always use /R:n and /W:m switches:

    Does this mean I should always use them in Robocopy as pair with setting values for each?

    What would be typical settings for each?
      My Computer


  6. Posts : 31,839
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #6

    mikeincousa said:
    Okay, Thanks. I thing have it save for my next sentence
    :You should always use /R:n and /W:m switches:
    Does this mean I should always use them in Robocopy as pair with setting values for each?
    What would be typical settings for each?
    Yes, you should use them, particularly the /R:n option. If you don't then the defaults could mean you spend far longer than you are prepared to wait should it try to copy a locked file.

    As for values to use, it really depends on what you may be doing with the files while RoboCopy is running. If you are likely to be editing any of them then set the retries and the wait high enough so it will still be trying to copy when you finish editing and save the file. For example, setting /R:10 without setting /W (so it will default to 30 seconds) will retry ten times over five minutes (300 seconds) before skipping copying an open file.

    For my purposes I want it to immediately skip any open files, so I use /R:0 (no retries).
      My Computers


  7. Posts : 104
    Windows 10 Home 22H2
       #7

    You can set them to any convenient values and save them as default by using the /Reg option. For e.g,

    Code:
    Robocopy source destination  /MIR (say) /REG /R:5 /W:5
    All subsequent Robocopy commands will default to /R:5 /W:5 until it's changed again.
      My Computer


  8. Posts : 331
    windows 10
    Thread Starter
       #8

    Thanks all. Next, I need to setup some test-runs to make sure I have all this down.
    Stay tuned for late-breaking news.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 08:28.
Find Us




Windows 10 Forums