Skip to content

Instantly share code, notes, and snippets.

@polamjag
Created March 24, 2015 19:20
Show Gist options
  • Select an option

  • Save polamjag/7e194fc77468826b169a to your computer and use it in GitHub Desktop.

Select an option

Save polamjag/7e194fc77468826b169a to your computer and use it in GitHub Desktop.
@echo off
SET /P var="backup? (Y/N) "
echo %var%
IF %var% == "N" GOTO END
set logfile=".\backup_%date:~0,4%-%date:~5,2%-%date:~8,2%.log"
robocopy "src" "dst" /MIR /R:2 /W:2 /XJD /XJF /FFT /256 /E /NP /TEE /LOG+:"%logfile%"
:END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment