- @echo off
- echo.
- set "spath=e:\视频\ZR"
- set "spatw=e:\视频\WQ"
- set "bakpath=f:\备份视频\ZR"
- set "bakpatw=f:\备份视频\WQ"
- set /a "y=%date:~,4%,m=1%date:~5,2%-2"
- if %m% lss 101 set /a y-=1,m+=12
- if not exist "%spath%\%y%\%m:~-2%\" (echo %y%年%m:~-2%月,视频已转! 按任意键退出 . . .
- echo.
- pause>nul&exit
- )
- @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%"=="jy" (
- echo 密码错误 ^^!
- pause>nul&exit
- )
- echo.
- ) else (
- cls
- rd /q /s %bakpath%&md %bakpath%
- rd /q /s %bakpatw%&md %bakpatw%
- xcopy /e /y "%spath%\%y%\%m:~-2%\*.*" "%bakpath%\%y%\%m:~-2%\"
- echo.
- xcopy /e /y "%spatw%\%y%\%m:~-2%\*.*" "%bakpatw%\%y%\%m:~-2%\"
- rd /q /s "%spath%\%y%\%m:~-2%\"
- rd /q /s "%spatw%\%y%\%m:~-2%\"
- )
- echo.
- echo %y%年%m:~-2%月%,执行完毕^^!
- echo.
- pause&exit /b
复制代码 我是win7系统,执行以上批处理失败。执行是错误提示,见截图。我把这个批处理文件放在桌面上,重启电脑时系统把我这个文件删除了。不知道为什么? |