Powershell 7zip不提取第二个和后续文件

时间:2018-03-16 17:09:48

标签: powershell-v3.0 7zip

这是我的代码:

set-alias sz "$env:ProgramFiles\7-Zip\7z.exe"
$7zf = "first.7z"
$7zp = "password1"
sz e $7zf "-p$7zp" $7zo
$7zf = "second.7z"
$7zp = "password2"
sz e $7zf "-p$7zp" $7zo

*它不优雅,但有50多个文件,优雅将后座用于实用程序

任何帮助将不胜感激

1 个答案:

答案 0 :(得分:0)

发现第二个密码破坏了脚本,因为实际密码有$