@echo off
echo check backup
REM %DATE:~11,3% = 星期一
REM %time:~0,2%;%TIME:~3,2%  = 22;33
IF not exist “%time:~0,2%;%time:~3,2%.txt” dir > “%time:~0,2%;%time:~3,2%.txt”
IF not exist “%DATE:~11,3%/” mkdir %DATE:~11,3%
IF not exist “%time:~0,2%;%time:~3,2%” mkdir “%time:~0,2%;%time:~3,2%”
xcopy “%DATE:~11,3%\*.*” /d /y “%time:~0,2%;%time:~3,2%”
move “%time:~0,2%;%time:~3,2%.txt” %DATE:~11,3%
pause
將資料夾以星期命名 做資料備份動作~

Views: 0