Robocopy Job Template
A safer starting point for repeatable Windows file copy jobs with logging and dry-run review.
Good For
- file share migration
- scheduled copy jobs
- backup staging
- large folder moves
How to Use It
- Run with `/L` first so Robocopy lists what it would copy without changing files.
- Review source, destination, exclusions, retry count, and log path.
- Avoid `/MIR` until you have explicitly accepted delete behavior.
- Run the real copy with logging enabled.
- Review Robocopy exit codes instead of treating every nonzero code as failure.
Execution Modes
- local
Inputs and Outputs
Inputs
- source path
- destination path
- exclusions
- log path
Outputs
- verbose-console
- log-file
Command Starter
Example pattern only. Adjust for your environment before running.
robocopy C:\Source \\server\share /E /L /R:2 /W:5 /LOG:C:\Temp\robocopy-preview.log robocopy C:\Source \\server\share /E /R:2 /W:5 /COPY:DAT /DCOPY:DAT /LOG+:C:\Temp\robocopy-run.log
Validation
- Preview log matches the intended copy scope.
- Run log shows acceptable exit code and copied/skipped counts.
- Destination permissions and sample files open correctly.
Reporting
- preview log
- run log
- migration note
Safety Notes
- Preview with `/L` before copying.
- Avoid `/MIR` until delete behavior is explicitly approved.