Add Robocopy

This commit is contained in:
2026-03-11 11:15:10 +00:00
parent 918c0aea32
commit 1b476a1618

22
Robocopy Normal file
View File

@@ -0,0 +1,22 @@
# Basic copy
robocopy \\SERVER01\C$\Logs C:\LocalLogs
# Mirror a folder (exact copy, deletes extras at destination)
robocopy \\SERVER01\C$\WebApp C:\Backup\WebApp /MIR
# Copy with logging
robocopy \\SERVER01\C$\Data C:\Backup\Data /E /LOG:C:\Logs\robocopy.log
# Copy only changed files, retry on failure
robocopy \\SERVER01\C$\Data C:\Backup /E /Z /R:3 /W:5
# Useful flags
# /E = include subdirectories (including empty)
# /MIR = mirror (sync + delete)
# /Z = restartable mode (resume interrupted transfers)
# /R:3 = retry 3 times on failure
# /W:5 = wait 5 seconds between retries
# /LOG = write output to log file
# /NP = no progress (cleaner log output)
# /XF = exclude files, e.g. /XF *.tmp *.log
# /XD = exclude directories