请教各位老师,以下代码执行时,我密码输入正确,仍无法执行,还是提示:对不起,您密码输入错误!- @echo off&setlocal EnableDelayedExpansion
- 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%\" (
- 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
- )
- rd /q /s %bakpath%&md %bakpath%
- xcopy /e /y "%spath%\%y%\%m:~-2%\*.*" "%bakpath%\%y%\%m:~-2%\"
- rd /q /s "%spath%\%y%\%m:~-2%\"
- echo.
- echo %y%年%m:~-2%月份,备份完毕!
- )
- ) else (
-
- echo %y%年%m:~-2%月已备份!
- echo.
- pause
复制代码
|