How to use Robocopy to copy files over the network
fast
The features included with Robocopy allow you to copy files very quickly, but remember that
you’ll need a wired connection for the best experience. The time to complete the transfer
will depend on the network connection speed and drive performance.
This is a two-step process. You must first configure file sharing on the source device, and
then use Robocopy in the destination device to perform the transfer.
Configuring file sharing on Windows 10
To copy files between two computers you must enable file sharing in the source device to
allow Robocopy access to copy the files from the destination device.
To share files on your local network using the express settings, use these steps:
a) Open File Explorer on Windows 10.
b) Navigate to the folder with the files that you want to migrate
c) Right click the folder, and select the Properties option
d) On the “Properties” page, click the sharing tab
e) Click the share button
f) Use the drop down menu to select the user or group to share file or folder.
g) Click the Add button
Share permission level
1. Note the network path for the folder that other users will need to access the content over the network,
and click the Done button.
2. Click the Close button.
S
hared folder path
After you complete the steps, make note of the folder path and the IP address of your
source computer
Quick tip: You can quickly find out your IP address on Settings > Network & Internet, click Wi-Fi or Ethernet, and
click the connection to view the information.
Using Robocopy to quickly copy a lot of files on Windows 10
Once file sharing is configured on the source device, you can proceed to copy the files using
Robocopy from the destination device.
To use Robocopy to copy files fast on
Windows 10, use these steps:
1. Open Start.
2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.
3. Type the following command to copy the files over the network and press Enter:
robocopy \\source-device-ip\path\to\share\folder C:\destination-device\path\to\store\files /E /Z /ZB /R:5 /W:5
/TBD /NP /V /MT:16
Example:
robocopy \\10.1.2.111\Users\admin\Documents C:\Users\admin\Documents /E /Z /ZB /R:5 /W:5 /TBD /NP
/V /MT:16
Roboc
opy Command Prompt
In the above command make sure to change the source and destination paths with your configuration.
Robocopy command options explained
Robocopy has a lot of features that you can use, and in the command shown in this guide,
we’re using the following options to make copy reliable and fast.
/S — Copy subdirectories, but not empty ones.
/E — Copy Subdirectories, including empty ones.
/Z — Copy files in restartable mode.
/ZB — Uses restartable mode, if access denied use backup mode.
/R:5 — Retry 5 times (you can specify a different number, default is 1 million).
/W:5 — Wait 5 seconds before retrying (you can specify a different number, the default is 30
seconds).
/TBD — Wait for sharenames To Be Defined (retry error 67).
/NP — No Progress – don’t display percentage copied.
/V — Produce verbose output, showing skipped files.
/MT:16 — Do multithreaded copies with n threads (default is 8).
Perhaps the most important switch to pay attention is /MT, which is a feature that enables
Robocopy to copy files in multithreaded mode. Typically, when you copy files using File
Explorer, you’re only copying one file at a time, but with multithreaded enabled, you can copy
multiple files at the same time better utilizing the bandwidth and significantly speeding up
the process.
If you don’t set a number when using the /MT switch, then the default number will be 8,
which means that Robocopy will try to copy eight files at the same time, but the tool
supports 1 to 128 threads.
In the command shown in this guide, we’re using 16, but you can set it to a higher number.
The only caveat is that the greater the number, the more processing power and bandwidth
will be utilized. If you have an older processor and an unreliable network connection, it could
cause issues, as such make sure to test the command before executing the command with
a high number of threads.
You can always view all the available switches, simply run the robocopy /? command. If
you have any problems, you can submit your questions to the Pureinfotech forums.