Do you ever suffer from the fact that copying files, for example to other disks or within your home network, is sometimes very slow? With the smart, hidden tool Robocopy it goes a lot faster. We explain how you can copy and move your files super fast.
Most likely you have been using Windows Explorer for years to manage and copy your files. For file management you can use that fine, but for copying large (numbers of) files, the Explorer does not always excel in speed.
That’s a shame, because there are plenty of situations in which you have to copy a lot. For example, if you have just installed Windows 10 or Windows 11 cleanly or when you start using a new computer. There is a good chance that you will then want to copy quite a few files, such as photos, videos and Office documents, to the new environment.
Not many people know that Windows has a hidden utility that allows you to quickly copy those files: Robocopy. The program already comes with several editions of Windows, you will also find it in Windows 10 and 11.
Robocopy is a contraction of Robust File Copy. It is a program that you use via the Windows command line. So don’t expect a user-friendly environment with the associated bells and whistles, but a lot of speed.
Safety before everything
Robocopy is a powerful program. Therefore, before you get started, always make a recent backup of your precious files. Save this backup in a remote location. This can be done on an external drive or USB stick or by using a cloud storage service. In addition, always try new commands with Robocopy on a folder with test files and check the result after the action. Only when you are happy with the outcome do you run the Robocopy command on the real files.
From the Command Prompt
You use Robocopy via the Windows Command Prompt. Open the start menu and type Command Prompt. Right click Command Prompt and choose As Administrator to carry out. Once the command line is shown, you can use Robocopy.
Now suppose you have the files in the folder Old want to copy to a newly created folder, New, on that same computer. Then it will look like this on the Command Prompt:
Robocopy C:Source Folder C:Target Folder
The example in practice:
Robocopy C:Old C:New
In addition, Old so the source folder and New the destination folder.
To copy subfolders as well, use the switch /E and /COPYALL. That looks like this:
Robocopy C:Source folder C:Target folder /E /COPYALL
You can customize how Robocopy works in detail using such switches. You will encounter them more often in the following tips.
Furthermore, with Robocopy you can indicate that you only want to copy files of a certain type and not the rest:
Robocopy C:Old C:New *.xlsx
In this example, only Excel files (with the extension .xlsx) are copied.
Do you only want files starting with a specific letter, for example the bcopy, then enter:
Robocopy C:Old C:New b*
If you want to copy multiple file names, you can also combine them. For example, for all files starting with a b and starting with a d enter the following command:
Robocopy C:Old C:New b* d*
What is, what isn’t?
If you copy a large amount of files, there may be subfolders in between that contain nothing, for example in system folders. It is not always useful to copy those empty subfolders. Robocopy can help with this by not including these folders in the copy action. You use the /S switch for this.
So: Robocopy /S. Do you want subfolders to always be copied, regardless of whether they are filled or empty? Then use the command Robocopy /E.
no fuss
Normally Robocopy shows a progress bar with the percentage of how far the copy action is. If you don’t necessarily need to see this information, you can turn off the progress indicator. To do this, use the command Robocopy /NP. This command (it is the abbreviation of No Progress) makes Robocopy work more invisibly.
If you want to stay informed about everything, you can show Robocopy a detailed overview of the progress. For this you use the command again Robocopy /V. Robocopy then not only shows what was copied, but also indicates which files were skipped during the copy.
Speed ​​gain
Robocopy supports copying in a so-called multithreaded mode. In practice, this means that several files are copied at the same time. Robocopy does not wait until a file has been completely copied, but also copies other files in the meantime. You use the switch /MT:n. Replace n by the number of threads allowed to run simultaneously. The default is 8, but you can increase the number. For example, type /MT:16 to run Robocopy with 16 threads.
The higher the number, the faster it is copied. But keep in mind that there are all kinds of factors that determine how quickly you can reliably copy your files. For example, if you work via WiFi, you can set a lower value than when your computer is connected with a cable. A higher value also places more demands on the processor.
If you have an older computer, it is wise to take this into account. You can use up to 128 threads (/MT:128). Always try the desired number of threads with a limited number of files first. If you are satisfied, apply the number to the larger copy actions.
Check Processor
Increasing the number of threads sounds good, of course, but how can you determine how much the processor is being loaded? You can find this out using Task Manager. Use the key combination Ctrl+Shift+Esc to open Task Manager.
On the tab Performance you can see, among other things, the processor usage, network usage and disk usage. As soon as you perform an action with Robocopy, you check the graphs and you can assess how heavily the processor is being loaded and whether that is acceptable.
Keep trying!
You may have experienced this when copying via File Explorer: the process is suddenly interrupted because a specific file cannot be copied. There can be several reasons for this, for example that the file is still in use by the operating system or is still open in a program. Fortunately, Robocopy doesn’t give up that easily. You can specify that the copy action should be retried several times.
type Robocopy /R:nwhere you n replaced by the number of times. For example /R:5, to try five times. By default, Robocopy waits 30 seconds before attempting the action again. If you want to speed that up, you feed Robocopy /W:n in, for example Robocopy /W:5 to make Robocopy wait only five seconds.
Do you copy files and folders over a network? If the network falters during a copy operation, this can also affect copying. Use the option /Z to ensure that Robocopy tries again in such a case.
Not too recent!
Let’s say you’d like to copy a folder of photos, but you’re only interested in photos from before a certain date. More recent photos do not need to be copied. With Robocopy you can specify a minimum age, so that files with a lower age are not included. The option for this is /MINAGE:n, where you have a number of options for n. You can replace n with the number of days.
Of Robocopy /MINAGE:30 for example, only copy files older than 30 days. That option works for up to 1900 days back (just over five years). Another option is for n specify a date (with the intention of YYYY/MM/DD), which excludes all files after that date. For example, enter this command to copy all files from before May 10, 2021:
Robocopy /MINAGE:20210510
The other way around is also possible: use /MAXAGE to use a maximum age and thus focus on the more recent files.
Move
With Robocopy you can not only copy files and folders, but also move them. You do that with the /MOV. After copying to the new location, the files in the original location will be deleted. If you also want to delete subfolders, use the /MOVE.
Robocopy C:Old C:New /MOV
Robocopy C:Old C:New /MOVE
If you are not quite sure yet, always choose to copy the folders first. If the files are safe in the new location, you can always manually delete the source folder and contents.
Through the network
Do you want to copy files over the network? This is also possible with Robocopy. This does require some preparation. First, make sure that Windows supports network copying. Open Windows Explorer (Windows key+E) and browse to the folder you want to copy the files from. Right click on the folder and choose Properties. Open the tab Parts and click the button Parts. Choose in the menu for Everybody and click the button To add. Bee Permission Level select the level you want, such as Reading writing.
If you only want to copy files from this folder and you don’t have to change anything, you can also choose Read. Finally click Parts. The full path to the folder appears in the summary window. You need this path for the Robocopy copy action. At the top of the window, click To copy. You can then paste the address somewhere, for example in Notepad. click on Ready. The folder is now accessible and can be copied.
Wire even faster
Do you want to copy files via your (home) network? For optimal speed, use a wired network connection and avoid wireless connections where possible. If you usually use WiFi, if you want to copy many or large files, consider connecting the devices to your router via a network cable.
Start copying
Open the Command Prompt again with administrator rights (as you read in tip 2) and use the following command:
Robocopy \ip-addressSource FolderSubfolder C:Target FolderSubfolder
In the first part of the assignment you indicate on which computer and in which location Robocopy can find the files. In the second part of the assignment you indicate to which computer the files should be copied and in which destination folder they should end up. An example makes it clear:
Robocopy \192.168.1.10UsersLisaAdministration C:UsersLisaAdministration
In this example, Robocopy retrieves the files from the computer with the ip address 192.168.1.10 in the map UsersLisaAdministration. The files are copied to a folder on the local computer, in C:UsersLisaAdministration.
More switches
As you have read, Robocopy has a large amount of switches with which you can adjust the operation in detail. Although we cover most of the options in this article, you can get a complete overview of all available options via the command line. Enter Robocopy /? and press Enter.
.