From 1b476a1618000d227ebdb3d38da60d3d29cb0323 Mon Sep 17 00:00:00 2001 From: adminx Date: Wed, 11 Mar 2026 11:15:10 +0000 Subject: [PATCH] Add Robocopy --- Robocopy | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Robocopy diff --git a/Robocopy b/Robocopy new file mode 100644 index 0000000..d00b863 --- /dev/null +++ b/Robocopy @@ -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 \ No newline at end of file