Preview a robocopy mirror before it deletes anything — via Microsoft Learn
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
- Change the source and destination paths to yours.
- Read
preview.txt. Lines marked *EXTRA File are files that a real run would delete from the destination. - When you're happy, run the same command without
/lto 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 /teeWith /l nothing is copied, deleted or time-stamped. Without it, /mir (/e plus /purge) really does delete extra files at the destination.
Sources
- robocopy — by Microsoft Learn
- 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.