Robocopy and Commands

CMOGAMING

Administrator
Staff member
Messages
32
Reaction score
0
Points
6
When using robocopy it this information may be of benefit if you're not familiar with the proper commands and/or syntax


Explanation:

- /MIR: Mirrors the directory tree (copies all subdirectories) and deletes files in the destination that have been removed from the source.
- /Z: Uses restartable mode (survives network glitches) for copying files.
- /R:5 /W:5: Specifies the number of retries on failed copies (default is 1 million retries) and the wait time between retries (in seconds).
- /TBD: Wait for sharenames to be defined (retry error 67).
- /NP: Specifies that file and directory names are not to be logged.
- /V: Produces verbose output, showing skipped files.
- /XD "G:\mydayzserver\mpmissions\zeladordev\exclude_folder": Excludes a specific folder from synchronization.
- /XF "G:\mydayzserver\mpmissions\zeladordev\exclude_file": Excludes a specific file from synchronization.
- /LOG:%LOG_FILE% 2>>%ERROR_LOG_FILE%: Logs the robocopy output to %LOG_FILE% and errors to %ERROR_LOG_FILE%.

Replace exclude_folder and exclude_file with the actual names of folders or files you want to exclude from the synchronization process, if needed. If there are no exclusions, remove the /XD and /XF flags.
 
Top