Created
April 8, 2015 15:36
-
-
Save pwelter34/c14fe1e37eaccf61391b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
for /F "tokens=1* delims= " %%A in ('date /T') do set CDATE=%%B | |
for /F "tokens=1,2 eol=/ delims=/ " %%A in ('date /T') do set mm=%%B | |
for /F "tokens=1,2 delims=/ eol=/" %%A in ('echo %CDATE%') do set dd=%%B | |
for /F "tokens=2,3 delims=/ " %%A in ('echo %CDATE%') do set yyyy=%%B | |
set datePart=%yyyy%-%mm%-%dd% | |
set backPath=D:\Backup\Back-%datePart% | |
IF NOT EXIST %backPath% mkdir %backPath% | |
@echo Backup to %backPath% ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment