Skip to content

Preview a robocopy mirror before it deletes anything — via Microsoft Learn

Commandmedium riskWindows 11Windows 10

robocopy /mir makes the destination an exact copy of the source, which means it also deletes files at the destination that aren't in the source. Add /l to list what would be copied and deleted without doing anything. Always do that first.

Takes effect right away

The easy way

  1. Change the source and destination paths to yours.
  2. Read preview.txt. Lines marked *EXTRA File are files that a real run would delete from the destination.
  3. When you're happy, run the same command without /l to really copy.

Command

Run in a normal Command Prompt / Terminal window.

robocopy C:\Users\Me\Documents E:\Backup\Documents /mir /l /fp /bytes /log:%USERPROFILE%\Desktop\preview.txt /tee
With /l nothing is copied, deleted or time-stamped. Without it, /mir (/e plus /purge) really does delete extra files at the destination.

Sources

Source reviewed
2026-11-02
Link checked
2026-11-02
Tested hands-on
Not by Oddbyte.Me

Oddbyte.Me hasn't tried this on every Windows build, so keep the undo handy.

robocopybackupmirrordry runcopy

More in Hidden Tools & Commands

Download a full macOS installer from Terminal — via SS64

Commandlow risk

softwareupdate can list and download complete macOS installers, including older versions Apple still serves. Useful for making a bootable USB installer or installing on another Mac without hunting through the App Store. This entry only downloads; it doesn't install anything.