UnixServerAdmin

Server Administration & Management

backup_via_date.bat

cd c:\
set mm=%date:~4,2%
set dd=%date:~7,2%
set yy=%date:~10,4%
md e:\backup\%mm%-%dd%-%yy%
xcopy c:\backup\* e:\backup\%mm%-%dd%-%yy% /E /F /H

Advertisements

May 22, 2013 Posted by | Shell Script, Windows | , | Leave a comment