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.
Resume a non-deleting photo and video copy
Open source and destination folders in Explorer before copying to a dedicated external-drive migration folder. Confirm their roles and quote full paths. A dedicated destination keeps migrated data distinct from unrelated files at a drive root.
Use /L with the same paths for a list-only preview when appropriate; it does not copy data. Keep logs outside the data folders being copied. During a long operation, inspect failures and outstanding items in the log.
Before resuming, finish source edits and rerun in the same direction. /Z enables restartable handling but does not guarantee an unchanged continuation if the source changed. Verify representative files by opening them and hashing important ones. Do not delete destination extras merely to clear their reported status.
- Inspect source and destination in Explorer
- Preview targets with /L if needed
- Store the log outside the copied data
- Resume in the same direction and verify contents
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.
Interpret exit status alongside the summary
Robocopy success is not limited to code 0. Code 1 indicates copied files, while 2 can indicate extra destination items; 8 or above indicates at least one copy failure. Read Failed, Mismatch and copied-file counts in the log as well.
With the non-deleting setup, destination-only files remain. Do not add /MIR or /PURGE merely to eliminate that status. If the destination contains unrelated material, use a new empty folder for a clearer comparison.
- Read the exit code immediately after execution
- Inspect the failure count in the log
- Review destination-only files separately
Confirm direction before resuming
Resume in the same source-to-destination direction. After reconnecting USB storage, confirm its volume label and folders in Explorer; adjust paths if the drive letter changed.
Save and close documents before copying. Comparing source and destination SHA-256 values can check important files beyond names and sizes. Identify failed files in the log and retry them; hashing itself does not change the copies.
- Confirm reconnected drive labels and paths
- Close applications after saving
- Compare hashes for important files
Choose the next action from the result
Scroll horizontally to see the full table →
| State | Interpretation | Next check |
|---|---|---|
| Execution with /L | Listing only, no copy | Do not treat it as a completed backup |
| Exit code 1 | Files were copied | Review failures and representative files |
| Exit code 8 or above | At least one copy failed | Investigate logged targets and retry |
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.
Are destination-only files removed?
They remain in this non-deleting workflow. Adding /MIR or /PURGE changes that behavior and is not an appropriate way to clear an extras status.
Does /Z make open files safe to copy?
Restartability differs from application-consistent saving. Save and close applications before copying their finalized data.
Sources and verification date
Sources checked: . These sources support the specifications, procedures or prices discussed here. Check each source for applicable conditions and current information.
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
- Set default players for MP3, FLAC and WAV in Windows 11
- Compare stereo, mono and spatial headphone playback in Windows 11