SET hr=%time:~0,2%
IF %hr% lss 10 SET hr=0%hr:~1,1%
REM This sets the date like this: mm-dd-yr-hrminsecs1/100secs
Set TODAY=%date:~6,4%-%date:~3,2%-%date:~0,2%-%hr%%time:~3,2%%time:~6,2%
"x:\7zipinstallationfolder\7z.exe" a x:\targetfolder\backupfilename_%TODAY%.zip x:\sourcefolder\*.*
from http://comptb.cects.com/114-automate-compression-tasks-cli
Nessun commento:
Posta un commento