Robocopy’s /L switch performs a dry run: it compares a source folder and destination folder, then lists the files and folders that its command would copy, update, or—when used with /MIR—delete, without changing either location. This guide applies to Windows 10 and Windows 11. Use /L with the same switches you plan to use for the real sync, especially if the eventual job will mirror folders.

Prerequisites and compatibility​

  • A Windows 10 or Windows 11 PC with the built-in robocopy.exe command. No download or restart is required.
  • Read access to the source folder and destination folder. Write access is not required for a true /L dry run, but some protected locations can still produce access-denied messages while Robocopy enumerates them.
  • Enough free space for a text log if you choose to create one.
  • The exact source and destination paths. They can be local paths, external drives, or network shares.
Examples used below:
  • Source: C:\Work\Project
  • Destination: E:\Backups\Project
  • Network destination: \\FileServer\Backups\Project
Put paths in quotation marks whenever they contain spaces.
Warning — /MIR is destructive only when /L is removed.
/MIR means “mirror,” which includes removing destination-only files and folders during a real run. With /L, Robocopy only lists those potential deletions. Do not remove /L until you have reviewed the log and confirmed that every listed extra destination item is safe to remove.

Primary procedure: preview a mirror sync before running it​

1. Identify the source and destination folders​

Decide which folder is authoritative:
  • The source is the folder whose current contents you want the destination to match.
  • The destination is the backup, external drive, network share, or second folder you intend to update.
For example, if C:\Work\Project is your current work folder and E:\Backups\Project is the backup, use:
Code:
Source:      C:\Work\Project
Destination: E:\Backups\Project
Do not reverse them. Robocopy evaluates changes relative to the first path (source) and second path (destination).

2. Create a folder for dry-run logs​

Creating a log makes it easier to review a large comparison and retain a record before you synchronize.
  1. Open File Explorer.
  2. Create a folder such as:
    C:\RobocopyLogs
  3. Ensure the folder is on a local writable drive.
You can skip the log folder if you only want to read the results in the Command Prompt window, but logs are strongly recommended for large folder trees.

3. Open Command Prompt​

Use a normal Command Prompt window for ordinary folders.
Windows 11
  1. Right-click Start.
  2. Select Terminal.
  3. If it opens PowerShell, select the down arrow next to the tab bar and choose Command Prompt.
Windows 10
  1. Select Start.
  2. Type cmd.
  3. Select Command Prompt.
Administrator elevation is usually unnecessary. If the source or destination is inside a protected location such as another user’s profile, C:\Windows, or C:\Program Files, right-click Command Prompt and select Run as administrator only if you are authorized to inspect those files.

4. Run a full dry-run mirror comparison​

Enter the following command, changing both paths for your folders:
robocopy "C:\Work\Project" "E:\Backups\Project" /MIR /L /XJ /FP /TS /BYTES /R:0 /W:0 /TEE /LOG:"C:\RobocopyLogs\Project-dryrun.txt"
Press Enter.
What each important switch does:
SwitchPurpose in this dry run
/MIRSelects mirror behavior: include subfolders and identify destination items that do not exist in the source.
/LLists actions only. It does not copy, delete, or change timestamps.
/XJExcludes junction points, reducing the risk of traversing redirected or repeated folder paths.
/FPDisplays full paths, making entries easier to identify.
/TSShows source timestamps.
/BYTESShows sizes in bytes instead of rounded units.
/R:0 /W:0Avoids long retry delays for inaccessible files or unavailable network locations.
/TEEShows results on screen and writes them to the log.
/LOG:Creates or overwrites the specified log file.
Expected result: Robocopy scans the two folder trees and displays a header, file and folder results, then a summary table. The run can take several minutes for a large folder tree or a slow network share, even though no files are copied.
The log is saved as:
C:\RobocopyLogs\Project-dryrun.txt

5. Read the listed differences before syncing​

Review the output in Command Prompt or open the log in Notepad. Focus on the file classifications and destination-only entries.
Common items to look for include:
  • New File: present in the source but absent from the destination. A real run would add it to the destination.
  • Newer: the source version is newer than the destination version. A standard sync would update the destination copy.
  • Older: the source version is older than the destination copy. Review this carefully; it may indicate that the destination has a newer file you do not want overwritten.
  • Changed or Modified: metadata, timestamp, size, or other compared properties differ. Robocopy’s normal comparison is not a cryptographic hash comparison.
  • Extra File or Extra Dir: exists in the destination but not the source. Because this dry run includes /MIR, a real run would delete these destination-only items.
A dry run may classify files differently from what you expect if the two locations use different file systems or timestamp precision. For example, a FAT32 or exFAT external drive can have timestamp differences compared with NTFS.

6. Check the summary and return code​

At the end, Robocopy reports totals for directories and files, including copied, skipped, mismatched, failed, and extras.
Because this is a listing-only run, do not interpret the word Copied in the summary as actual transfer activity. /L prevents data copying, deletion, and timestamp changes. Instead, treat those counts as the operations Robocopy selected for the proposed real run.
To display the return code immediately after the command finishes, enter:
echo %ERRORLEVEL%
For a dry-run comparison, use the exit code as a health indicator:
  • 0 generally means no selected differences and no failures.
  • 1 through 7 can represent detected differences without a copy failure.
  • 8 or higher means Robocopy encountered at least one failure, such as access denied, an unavailable share, or an invalid path.
If the output is 8 or higher, resolve the reported errors before relying on the comparison.

7. Make corrections, then rerun the same dry run​

If the preview shows unexpected items:
  • Correct the source or destination path.
  • Add exclusions for content that should not be synchronized.
  • Resolve network access or permission errors.
  • Rerun the same /L command and review the new log.
For example, to exclude a destination cache folder named Temp and all .tmp files from consideration:
robocopy "C:\Work\Project" "E:\Backups\Project" /MIR /L /XJ /XD "Temp" /XF "*.tmp" /FP /TS /BYTES /R:0 /W:0 /TEE /LOG:"C:\RobocopyLogs\Project-dryrun.txt"
Use exclusions cautiously. An exclusion means Robocopy will not use those items to make the destination match the source.

Verification of success​

A successful comparison has these characteristics:
  1. The command completes and returns an exit code below 8.
  2. The source and destination paths shown in the Robocopy header are correct.
  3. The log contains the expected new and updated source items.
  4. Every Extra File and Extra Dir entry is understood before a mirror operation is approved.
  5. There are no unexpected Access is denied, ERROR 53, ERROR 67, or path-not-found messages.
  6. The Failed counts in the final summary are zero.
If the two folders should already be identical, the desired result is:
  • No files selected for copying or updating.
  • No extras listed.
  • No mismatches or failures.
  • Usually an exit code of 0.

Alternate method: preview additions and updates without evaluating deletions​

Use this method when you want to update a backup but do not intend to delete destination-only files. Replace /MIR with /E:
robocopy "C:\Work\Project" "E:\Backups\Project" /E /L /XJ /FP /TS /BYTES /R:0 /W:0 /TEE /LOG:"C:\RobocopyLogs\Project-copy-preview.txt"
/E includes all subdirectories, including empty ones, but does not request mirror cleanup. This is the safer preview for a one-way copy where the destination may intentionally contain files not found in the source.
Use /MIR /L only when the real job is specifically intended to make the destination an exact mirror of the source.

Troubleshooting and rollback/escalation​

The command reports “ERROR 3” or says the system cannot find the path​

Check both paths in File Explorer first.
Common causes:
  • A drive letter changed after reconnecting an external disk.
  • A folder name is misspelled.
  • A quoted path contains an accidental extra quotation mark.
  • A network share is unavailable.
For a network location, use a UNC path such as:
robocopy "C:\Work\Project" "\\FileServer\Backups\Project" /MIR /L /XJ /R:0 /W:0
Do not use a mapped drive letter unless it is visible in the same user session where Command Prompt is running.

The command reports “Access is denied”​

Confirm that your account can open the source and destination paths in File Explorer. Close applications that may lock files, such as Outlook, database tools, backup software, or editors working inside the folder.
If the path is protected and you have authorization, reopen Command Prompt or Windows Terminal using Run as administrator, then rerun the dry run. Do not add /B or /ZB merely to bypass permissions for a routine folder comparison: backup mode can override normal ACL restrictions and is inappropriate unless you understand and are authorized to use it.

The dry run lists unexpected repeated folders or profile locations​

Robocopy follows junction points by default. Junctions can redirect paths and cause unexpected traversal, especially under user profiles or system folders.
Use /XJ, as shown in the main command. If you need more targeted handling, use:
/XJD
to exclude directory junctions only, or:
/XJF
to exclude file junctions only.
For ordinary backup and sync jobs, /XJ is the safer default.

Many files show as changed after copying to FAT32, exFAT, NAS storage, or older devices​

Different file systems can record timestamps with different precision. Add /FFT to tell Robocopy to use FAT-style two-second timestamp tolerance:
robocopy "C:\Work\Project" "E:\Backups\Project" /MIR /L /XJ /FFT /FP /TS /BYTES /R:0 /W:0 /TEE /LOG:"C:\RobocopyLogs\Project-dryrun.txt"
Rerun the preview and compare the results. Use /FFT only when the destination’s timestamp behavior warrants it; do not add it automatically for two NTFS folders.

The dry run is slow or appears to pause on a network share​

A dry run still has to enumerate directories and read file metadata. Confirm the share is reachable in File Explorer and that the connection is stable.
The main command uses /R:0 /W:0 to prevent a missing or inaccessible item from causing Robocopy’s otherwise lengthy retry behavior. If files are actively changing during the scan, wait until activity subsides and rerun the preview for a consistent result.

You accidentally ran a real /MIR command without /L

Stop the command promptly with Ctrl+C. Do not run additional mirror commands while assessing the result.
Recovery options depend on what was changed:
  1. Check the destination’s Recycle Bin only if the destination is a local drive and deletion behavior placed items there; do not assume Robocopy deletions are recoverable from it.
  2. Restore deleted destination-only files from a separate backup, File History, a cloud version-history service, a NAS snapshot, or a volume snapshot if available.
  3. Preserve the Robocopy log, if one was created, because it identifies affected paths.
  4. Before retrying, run the exact intended command again with /L restored and review every listed extra destination item.