How to Use the Robocopy Command for Faster File Transfers in Windows 11

When you need to copy a massive folder—such as a 500GB photo archive or an entire project directory containing thousands of tiny files—the standard Windows 11 copy-and-paste interface is notoriously inefficient. The graphical file explorer calculates sizes slowly, struggles with deep folder paths, and worst of all, completely halts the entire transfer if it encounters a single locked file or permission error.

To securely and rapidly transfer large amounts of data, IT professionals rely on a built-in command-line tool called Robocopy (Robust File Copy). Unlike the graphical interface, Robocopy can transfer files simultaneously (multi-threading), skip files that haven’t changed, and automatically retry failed copies without user intervention.

Why Use Robocopy Over Standard Copying?

Robocopy was designed specifically for creating reliable backups and mirroring directories over networks. Its primary advantages include:

  • Speed: It uses multi-threading to copy dozens of files at the exact same time, drastically reducing the time it takes to move thousands of small files.
  • Resilience: If your network connection drops, Robocopy can resume the transfer where it left off. If a file is locked, it will wait and try again instead of throwing an error and cancelling the whole job.
  • Mirroring: It can intelligently scan the destination folder and only copy files that are new or have been modified, saving hours of unnecessary transfer time.

How to Use the Basic Robocopy Command

Robocopy is a command-line tool, meaning you must run it from the Command Prompt or PowerShell. The syntax requires the command, followed by the source folder, the destination folder, and any specific options (flags).

robocopy [Source] [Destination] [Options]

Example: Copying a Large Directory

If you want to copy a massive folder of videos from your C: drive to an external hard drive (D: drive), follow these steps:

  1. Click the Start button, type cmd, and press Enter to open the Command Prompt.
  2. Type the following command (using quotes if your folder names contain spaces):

robocopy "C:\Users\Name\Videos\Raw Footage" "D:\Backup\Raw Footage" /E /MT:32

Let’s break down the critical flags used in this command:

  • /E : This tells Robocopy to copy all subdirectories, including ones that are completely empty. This ensures the exact folder structure is preserved.
  • /MT:32 : This is the secret to Robocopy’s speed. MT stands for Multi-Threading. By setting it to 32, you instruct Windows to copy 32 files simultaneously. You can push this number up to 128, but 32 is a safe balance for most modern CPUs and hard drives.

How to Mirror a Directory for Backups

If you use an external drive for weekly backups, you don’t want to copy the entire 500GB folder every single week. You only want to copy the files that changed and delete the files from the backup that you removed from your main drive.

You can achieve this perfect synchronization using the Mirror flag (/MIR).

robocopy "C:\Users\Name\Documents" "D:\Backup\Documents" /MIR /MT:32

Warning: The /MIR command is incredibly powerful, but it is also destructive. If you delete a file in the source folder, running the MIR command will permanently delete that file in the destination folder to ensure both locations are exact mirrors. Always double-check your source and destination paths before pressing Enter.

How to Handle Locked Files

The standard Windows copier fails when it hits a file currently in use by another program. Robocopy handles this gracefully using the retry flags.

Add /R:5 /W:15 to your command.

This tells Robocopy that if it encounters a locked file, it should Retry 5 times (/R:5), waiting 15 seconds (/W:15) between each attempt. If the file remains locked, it simply skips that specific file and continues copying the rest of your data, completely unattended.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.