【发布时间】:2015-02-02 16:47:57
【问题描述】:
我正在使用 Powershell(V4) 并且我正在按照代码给出 here,但是,当我运行代码时它给了我一个错误。
我的代码:
[string]$zipPath="C:\Users\someUser\7z.exe"
[string]$parameters= 'a', '-tzip','C:\Users\someUser\Desktop\Archive.zip','C:\Users\someUser\Desktop\Test'
Powershell 视图:
PS C:\Users\someUser> $zipPath="C:\Users\someUser\7z.exe" $parameters= 'a', '-tzip','C:\Users\someUser\Desktop\Archive.zip','C:\Users\someUser\Desktop\Test' & $zipPath $参数
& $zipPath $parameters
输出:
7-Zip (A) 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
Error:
Incorrect command line
【问题讨论】:
标签: powershell 7zip