This article explains how to use a robocopy with SMB compression to transfer local or network files in Windows 11 quickly.
In most settings, users typically use a USB thumb drive to copy files from one computer to another. This isn’t bad, but it’s not ideal when the file you wish to copy is large.
Using File Explorer and a USB thumb drive to copy files can be slower and may lead to your computer being unresponsive in some cases. If you are on a network or need to copy large files, using Robocopy might be the best when compression is enabled.
Robocopy (Robust File Copy) is a command-line tool that quickly copies files and other data over a network or locally. In cases where you need to copy large files between two networked computers, use Robocopy instead.
Copy files over the network using Robocopy
As mentioned, Robocopy is a command line tool that lets you copy files faster when SMS compression is enabled. In Windows 11, SMS compression mode is enabled by default.
To do that, use the steps below.
First, you must enable file sharing on both computers. Then, you must also share the folder containing the files you want to transfer to the other computer.
You will also need to know the name or IP address of the other computer you want to connect to.
You can find this information in the post below.
- How to enable file and printer sharing in Windows 11
- How to share files and folders in Windows 11
- How to find your computer name in Windows 11
With the information handy, continue below with copying your files using Robocopy.
Before using Robocopy, run the commands below to add your account to the Windows 11 vault (credential manager).
cmdkey /add:COMPUTER or IP /user:COMPUTERNAME\USERNAME /pass:PASSWORD
Replace COMPUTERNAME with the target computer and USERNAME and PASSWORD with the username and password on the target machine.
If the machine is in a domain environment, you can replace COMPUTERNAME with the domain name.
You can also replace the IP address with a computer name if you want to.
Example:
cmdkey /add:192.168.1.2 /user:WORKGROUP\geekrewind /pass:password
After running the commands above, use the command format below to copy your files with Robocopy and SMS compression.
robocopy \\source-ip-address\path\to\remotesharedfolder C:\local-device\path\to\destinationfolder /E /Z /ZB /R:5 /W:5 /TBD /NP /V /MT:16 /compress
Example.
robocopy \\192.168.1.2\Documents\RemoteSharedFolder C:\Users\geekrewind\Documents /E /Z /ZB /R:5 /W:5 /TBD /NP /V /MT:16 /compress
When you press enter, your files should begin to copy over to the local device.
Below is a description of the Robocopy options:
- /E — Copy Subdirectories, including empty ones.
- /Z — Copy files in restartable mode.
- /ZB — Uses restartable mode. If access is denied, use backup mode.
- /R:5 — Retry 5 times (you can specify a different number, the default is 1 million).
- /W:5 — Wait 5 seconds before retrying (default is 30 seconds).
- /TBD — Wait for share names To Be Defined (retry error 67).
- /NP — No Progredon’tdon’t display percentage copied.
- /V — Produce verbose output, showing skipped files.
- /MT:16 — Do multithreaded copies with n threads (default is 8).
- /compress — Enables SMB compression to speed up transfers over the network.
That should do it!
Conclusion:
- Robocopy offers a powerful and efficient solution for copying large files over a network or locally using SMS compression.
- Users can significantly reduce the time and resources required for file transfers by enabling SMS compression, improving productivity.
- The provided step-by-step guide simplifies the process, making it accessible to users of varying technical expertise.
- We welcome your input through the comments section below for any feedback, corrections, or additional insights.
Leave a Reply