How to use Robocopy multi-threaded feature to speed up file copy on Windows 10 - Windows Basics


Saturday, June 19, 2021

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

When you have to copy a large number of files to another drive, Robocopy can speed up the process with its multithreading feature. Let's refer to how to use the multi-threaded Robocopy feature to speed up file copying on Windows 10 in this article!

To copy files to another drive, you typically use the standard select, copy, and paste process. While this works well, the speed becomes a bottleneck when you are trying to transfer a lot of files and it can take a long time.

Many tech-savvy users, instead, use Robocopy (Robust File Copy), the command-line tool built into Windows 10 that provides more features to move data to another location faster.

One feature that makes Robocopy special (and often overlooked) is its multi-threaded feature that allows you to copy multiple files at once. Instead of copying files one by one, use the copy feature built into File Explorer.

In this tutorial, you will learn how to use the multithreading feature on Robocopy to speed up the transfer of files and folders to another drive on Windows 10.

How to use multithreading with Robocopy

If you are about to copy a large set of files and folders to another drive, use these steps to make the multithreaded Robocopy feature copy data super fast.

1. Open Start.

2. Search for Command Prompt, right-click the result and select Run as administrator.

3. Type the following command to copy files and folders to another drive and press Enter:

robocopy C:\source\folder\path\ D:\destination\folder\path\ /S /E /Z /ZB /R:5 /W:5 /TBD /NP /V /MT:32

For example:

robocopy C:\Users\admin\Documents D:\Users\admin\Documents /S /E /Z /ZB /R:5 /W:5 /TBD /NP /V /MT:32

In the above command make sure to change the source and destination paths with your configuration.

Robocopy command breakdown

Robocopy has a lot of features and in this shown command we are using the following switches for reliable and fast copying.

/S - Copy subdirectories, excluding empty directories.

/E - Copy subdirectories, including empty directories.

/Z - Copy files in reboot mode.

/ZB - Use reboot mode, if access is 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 trying again (you can specify a different number, default is 30 seconds).

/TBD - Wait for sharenames To Be Defined (retry error 67).

/NP - No Progress - does not show copy rate.

/V - Generate output, show ignored files.

/MT:32 - Multithreaded clone with n threads (default is 8).

The most important switch to focus on the above command is /MT, which allows Robocopy to copy files in multithreaded mode. If you do not put a number next to the /MT switch, the default number will be 8, which means that Robocopy will try to copy 8 files simultaneously. However, Robocopy supports 1 to 128 threads.

In this command we are using 32 threads, but you can set it to a higher number. Note: the larger the number, the more system resources and bandwidth will be used. If you own an old processor, using a large number will affect performance, so be sure to test before executing instructions with a large number of threads.

When you complete these steps, you will notice that copying files and folders takes less time.

Not only do you have the ability to copy files and folders to an external or internal drive, this also works for moving files over a network.

No comments:

Post a Comment