GUIDE深度 · Deep dive

Robocopy Basics

Robocopy is Windows' built-in tool for large trees and long paths. For backups use /E for subdirectories and /COPY:DAT for data, attributes and timestamps; avoid /MIR, which deletes extra files on the destination.

更新 2026-10-31 · 公式可核验

Common flags

/E: include empty subdirs; /COPY:DAT: data, attributes, timestamps.

/R:1 /W:1: retry once and wait one second.

/XJ: skip junctions to avoid loops.

Exit codes

0-7 are normal; 8+ means errors.

The script warns on 8+ but does not stop.

FAQ

Can I use /MIR?

Only when you truly want a mirror; it deletes extra destination files, so this generator avoids it.

Does it resume?

Rerun it; unchanged files are skipped.

Sources

Related calculators

Backup Script GeneratorChoose Documents, Desktop, Pictures or a custom folder to generate a robocopy backup script; copy/update only, no deletion.

More guides

The 3-2-1 Backup RuleRead guide