How-to guides · Windows 11

Copy Large Folders with Robocopy: Preview, Resume and Check Results

Use Robocopy with /E and /Z for a restartable folder copy. Preview the plan with /L, then inspect the log, return code, and copied files. This example does not delete source files or destination-only files.

Published · Updated · FaultNote editorial policy

Copy Large Folders with Robocopy: Preview, Resume and Check Results overview: 1. Understand the paths and copy behavior, 2. Preview without copying, 3. Run the reviewed copy, 4. Interpret the return code and failures, 5. Verify copied content
An overview of this guide’s steps and checks, not a screenshot of the app.

Who this guide is for and what to prepare

  • People copying many documents or photos to an external drive or share
  • People checking reruns and failures after interrupted copying

What you need

  • Verify full source and destination paths, free space, and normal access permissions.
  • Start with an empty dedicated destination and close apps updating the source files.
  • Open Windows PowerShell or PowerShell. Copying your normally accessible files does not inherently require elevation.

1. Understand the paths and copy behavior

YourName and E: below are examples; replace them after checking the real folders. Keep the destination outside the source, and avoid starting with an entire drive.

Without deletion flags, matching destination files can still be updated or overwritten. Use a dedicated destination rather than mixing the transfer with existing work.

Scroll horizontally to see the full table →

1. Understand the paths and copy behavior
OptionRole in this example
/EInclude empty subdirectories
/ZUse restartable mode for interrupted file copies
/R:2 /W:2Limit retries to two with a two-second wait
/XJExclude junctions; this does not exclude every type of link
/LList planned actions without copying
  1. Open both locations in File Explorer and inspect contents and free space.
  2. Review the options below and confirm they suit your files.

2. Preview without copying

This command lists planned file operations and writes a log under TEMP; it does not perform the copy. Return to this preview whenever you change the paths.

PowerShell
$copySource = 'C:\Users\YourName\Documents'
$copyDestination = 'E:\PC-transfer\Documents'
$copyLog = Join-Path $env:TEMP 'robocopy-transfer.log'
robocopy $copySource $copyDestination /E /Z /R:2 /W:2 /XJ /L /TEE "/LOG:$copyLog"
  1. Replace the two example paths with the actual locations and run the command.
  2. Check Source, Dest, listed files, and errors. Stop here if a location is wrong.

3. Run the reviewed copy

Run this in the same PowerShell session. It removes /L and appends to the existing log. Do not add /MIR, /PURGE, /MOV, or /MOVE to this example.

PowerShell
robocopy $copySource $copyDestination /E /Z /R:2 /W:2 /XJ /TEE "/LOG+:$copyLog"
$copyResult = $LASTEXITCODE
$copyResult
  1. Recheck source and destination, then run the copy below.
  2. Keep the connection available until completion. After interruption, verify the paths and rerun the same configuration.

4. Interpret the return code and failures

A nonzero Robocopy result does not always mean failure. A value of eight or higher indicates at least one failure. Values zero through seven can still indicate extras or mismatches, so inspect the log too.

  1. Review the captured $copyResult and the totals at the end of the log.
  2. For failed files or errors, inspect the listed path, free space, permissions, and connection; correct the cause before rerunning.
  3. Extras are items present only in the destination. This example leaves them in place.

5. Verify copied content

Normal comparison uses properties such as names, sizes, and times; it is not a cryptographic content check. Open important output and compare hashes where that extra verification is needed.

  1. Open representative documents, photos, and projects from the destination.
  2. For files requiring an exact check, run Get-FileHash -Algorithm SHA256 on source and destination and compare the values.
  3. Retain originals until verification is complete and keep the log for the period you need.

Limitations and requirements

  • This example is not a versioned backup. Use separate retention if you need content from before an overwrite.
  • Check whether excluded junctions point to needed data. Review special folders containing links or cloud-only content individually.
  • Locked or inaccessible files may fail. Do not automatically add backup-mode flags to bypass permissions.

Frequently asked questions

Do exit codes 1 or 3 mean failure?

Not necessarily. One indicates copied files; three also indicates destination extras. Check failure values of eight or higher as well as log counts and mismatches.

Should I add /MIR to make copying faster?

/MIR is not a speed setting. It mirrors the source and deletes destination extras, so it is not part of this no-deletion example.

Official sources and verification date

Sources checked: . Check the official sources below for changes to supported systems, plans and menus.

Related practical guides

Windows 11 troubleshooting

How-to guides: browse all guides →