- @echo on
- setlocal enabledelayedexpansion
- :pw
- echo. 读取文本密码
- for /f "delims=" %%x in ('TYPE pw.txt')do (
- set pw=%%x
- )
- :chpw
- echo. 7z转换zip
- path "%ProgramFiles%\7-Zip";%path%
- for /f "delims=" %%i in ('dir /b /s /a-d *.7z') do (
- 7z x "%%i" -o"%~dp0~Tmp" -r -y -aos -p!pw!
- 7z a "%%~dpni.zip" "%~dp0~Tmp\*" -y -sdel
- )
- rd ~Tmp /s /q
复制代码 如果压缩包无密码 转换正常,有密码则转换失败??求解... |