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
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 →
| Option | Role in this example |
|---|---|
| /E | Include empty subdirectories |
| /Z | Use restartable mode for interrupted file copies |
| /R:2 /W:2 | Limit retries to two with a two-second wait |
| /XJ | Exclude junctions; this does not exclude every type of link |
| /L | List planned actions without copying |
- Open both locations in File Explorer and inspect contents and free space.
- 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.
$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"- Replace the two example paths with the actual locations and run the command.
- 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.
robocopy $copySource $copyDestination /E /Z /R:2 /W:2 /XJ /TEE "/LOG+:$copyLog"
$copyResult = $LASTEXITCODE
$copyResult- Recheck source and destination, then run the copy below.
- 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.
- Review the captured $copyResult and the totals at the end of the log.
- For failed files or errors, inspect the listed path, free space, permissions, and connection; correct the cause before rerunning.
- 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.
- Open representative documents, photos, and projects from the destination.
- For files requiring an exact check, run Get-FileHash -Algorithm SHA256 on source and destination and compare the values.
- 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 Home vs Pro: When Is the Upgrade Worth It?
- Back Up Files with Windows 11 File History and Test a Restore
- Move Files to a New Windows PC with an External Drive
- Save selected PDF pages with Microsoft Print to PDF