robocopy — by Microsoft Learn
The full command reference for robocopy, with every copy, retry, logging and job option plus a table of exit codes. Useful for backup scripts: it shows /MIR, /MT, /R and /W, /LOG, and how exit code 8 and above signals a real failure while lower values only describe what was copied. /MIR and /PURGE delete destination files missing from the source, so test with /L first.
Quick steps
- Mirror a folder with robocopy C:\Source D:\Backup /MIR /R:2 /W:5 /LOG:C:\Logs\Backup.log
- Add /L to list what would happen without copying
- Treat exit codes of 8 or higher as failures
Paraphrased from the source. Menus can differ by version, so check the original for full details.
Source: robocopy by Microsoft Learn. Licence: Link only (©).
- Source reviewed
- 2026-11-02
- Link checked
- 2026-11-02
- Tested hands-on
- Not by Oddbyte.Me