ThisCalculator

Everyday

Robocopy Resume Interrupted Copy: Common Questions

Updated · Standard formula, shown below

Robocopy can resume an interrupted copy, but with an important caveat: it does not resume from the exact byte where it stopped. Instead, it re-scans the source and destination, then copies only files that are missing or have changed since the last run. This makes a second run fast and safe, but it is not a true checkpoint-and-resume like a download manager would use. Below are the answers to the most common questions about using robocopy to continue a large or interrupted file transfer.

How Robocopy Restartability Works

Robocopy (Robust File Copy) is a command-line tool built into Windows. When you run it again after an interruption, it compares the source and destination directories. By default, it skips files that already exist in the destination with the same size and timestamp. Files that are missing, partially copied, or changed are copied again from the beginning.

This behavior is controlled by the /Z (restartable mode) and /B (backup mode) switches. The /Z switch is the one most people mean when they ask about resuming. It allows robocopy to survive a network drop or a reboot by writing a small journal file that records how far each file copy got. On the next run, robocopy reads that journal and continues from the last completed chunk, rather than restarting the file from zero. However, the journal is only for the file currently being copied; files that were not started are simply re-evaluated.

What Actually Happens When You Re-run Robocopy

Suppose you are copying a 50 GB folder and the process stops at 30 GB due to a power failure. When you run the same robocopy command again, it will:

  • Re-enumerate the entire source directory tree.
  • For each file, check if a corresponding file exists in the destination.
  • If the destination file is missing or has a different size or timestamp, it copies it (or resumes it if /Z was used and a journal exists).
  • If the destination file matches, it skips it.

The result is that the second run only transfers the remaining data, not the whole 50 GB. The time saved depends on how much was already copied and how fast your disk or network is.

Choosing the Right Switches for Resumable Copies

To get the best resume behavior, use these switches in your command:

  • /Z – Restartable mode; writes a journal for the current file so it can resume mid-file.
  • /B – Backup mode; lets robocopy copy files even if you lack read permissions, and it also helps with files that are locked by other processes.
  • /MT:n – Multithreaded copy with n threads (default is 8). This speeds up the initial copy but can make the journal less reliable across crashes; it is still safe, but the resume may restart a file if the thread that was copying it died.
  • /R:n – Number of retries per failed file (default 1,000,000). Lower it to something like /R:3 to avoid endless retries on a broken network.
  • /W:n – Wait time between retries in seconds (default 30). Set it to /W:1 for faster retry cycles.

A typical command for a large, resumable copy would be:

robocopy "C:\source" "D:\dest" /E /Z /B /MT:16 /R:3 /W:1

The /E switch copies all subdirectories, including empty ones. If you are copying over a network, add /NP (no progress) to reduce overhead, and /LOG:file.txt to keep a log so you can see what was skipped.

Common Problems and How to Avoid Them

Even with /Z, you might run into issues that prevent a clean resume:

  • Changed source files: If a file is modified while robocopy is running, the copy may fail or produce a partial file. On the next run, the file will be re-copied because its timestamp/size changed.
  • Destination permissions: If you do not have write access to the destination folder, robocopy will fail with access denied. Running as Administrator or using /B can help, but you still need write permissions on the target.
  • Network drop with /Z: The journal file is stored in the destination folder (or a temporary location). If the network drops mid-file, the journal may be lost. Re-running will restart that file from zero.
  • Using /MIR accidentally: The mirror switch deletes files in the destination that are not in the source. If you use it to resume, you might delete files that were copied earlier but are no longer in the source. Avoid /MIR unless you intend to mirror exactly.

Robocopy vs. Other Copy Tools for Resuming

Robocopy is not the only option. Windows File Explorer’s copy does not support resume; it restarts the whole file. Third-party tools like TeraCopy or FastCopy have their own resume logic, but they are not built into Windows. Robocopy’s advantage is that it is free, scriptable, and handles large directory trees efficiently. Its disadvantage is that the resume is not byte-level for all files; it only resumes the current file if /Z was used and the journal survived. For most users, that is sufficient because the main cost is re-scanning millions of files, which robocopy does quickly.

Safety and Data Integrity

Robocopy is generally safe to run multiple times. It does not delete anything unless you use /MIR or /PURGE. It will overwrite files that are different in the destination, but only if they are older or different in size. To be extra safe, you can add /XO (exclude older) to skip source files that are older than the destination, or /XN to skip newer. However, for a resume, you usually want to copy everything that is missing, so the default behavior is fine.

One caution: if you are copying to a network share and the connection is unstable, the journal file might be written to the network itself, which can cause issues. You can use the /J switch (unbuffered I/O) to reduce cache memory, but it does not affect resume. For very large files, consider splitting the copy into smaller batches or using a tool designed for resumable transfers.

Frequently Asked Questions

Does robocopy resume from where it stopped?

It resumes at the file level, not the byte level, unless you use /Z and the journal is intact. With /Z, the current file can resume from the last chunk. Other files that were not started are copied from the beginning, but they are skipped if they already exist and match.

Will running robocopy twice duplicate files?

No. Robocopy skips files that already exist in the destination with the same size and timestamp. It only copies files that are missing or different. Running it again will not create duplicates.

What if the destination has a file that is newer than the source?

By default, robocopy will overwrite it, because the default is to copy all files regardless of timestamp. If you want to keep the newer destination file, use the /XO switch to exclude older source files.

Can I resume a copy after a reboot?

Yes. Robocopy is not a service; you just run the same command again after reboot. The /Z journal is stored on disk, so it survives a reboot. However, if the journal was for a file that was being written when the system crashed, that file may be corrupted and will be re-copied.

How do I know if the copy completed successfully?

Robocopy returns an exit code: 0 means no files were copied, 1 means files were copied successfully, 2 means extra files/directories were detected, 3 is a combination, and anything above 7 is an error. You can check the log file for errors. A good practice is to run robocopy again after a failure; if it returns 0 or 1, the copy is complete.

Does robocopy work over FTP or cloud storage?

No. Robocopy works with Windows file paths, including mapped drives and UNC paths (\server\share). It does not natively support FTP or cloud APIs. For cloud storage, you would need a separate tool or a virtual drive that maps the cloud to a local drive letter.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.