- @echo off
- echo.
- set "w=e:\移除.bat"
- set "spath=e:\外勤"
- set "bakpath=d:\备份\外勤"
- set /a "y=%date:~,4%,m=1%date:~5,2%-2"
- if %m% lss 101 set /a y-=1,m+=12
- if exist "%spath%\%y%\%m:~-2%\" (
- call %w%
- ) else echo %y%年%m:~-2%已移除,退出!
- echo.
- pause
复制代码
- @echo off&setlocal EnableDelayedExpansion
- chcp 437>nul&graftabl 936>nul
- echo hP1X500P[PZBBBfh#b##fXf-V@`$fPf]f3/f1/5++u5x>in.com
- echo.
-
- set /p pw=请输入密码: <nul
- for /f "tokens=*" %%i in ('in.com') do set pw=%%i
- del in.com
- if not "%pw%"=="jyzr" (
- echo.
- echo.
- echo 密码错误^^!
- pause>nul&exit
- )
- echo.
- echo.
- set "spath=e:\外勤"
- set "bakpath=d:\备份\外勤"
- set /a "y=%date:~,4%,m=1%date:~5,2%-2"
- if %m% lss 101 set /a y-=1,m+=12
- if exist "%spath%\%y%\%m:~-2%\" (
- rd /q /s %bakpath%&md %bakpath%
- echo.
- xcopy /e /y "%spath%\%y%\%m:~-2%\*.*" "%bakpath%\%y%\%m:~-2%\"
- echo.
- rd /q /s "%spath%\%y%\%m:~-2%\"
- )
- )
- echo.
- echo %y%年%m:~-2%月份,备份完毕!
- pause & exit /b
复制代码
|