【发布时间】:2013-08-23 06:35:28
【问题描述】:
我正在尝试使用 7z.exe 运行仅提取 .jar 文件的批处理文件
这是我的代码:
set location=%cd%
set filename=%location%\outputfolder
set unzip=%location\resources
cd %unzip%
7z e -o%filename% -ir!*.jar -y "%filename%\*.zip"
但它给出了一个例外:error: incorrect command line,所以我删除了-ir!*.jar,然后它给出了另一个错误:error: cannot use absolute pathnames for this command 所以我将-o%filename% 更改为-oC:\outputfolder,它可以工作!!!!!!(这是我的脚本):
set location=%cd%
set filename=%location%\outputfolder
set unzip=%location\resources
cd %unzip%
7z e -oC:\outputfolder -y "%filename%\*.zip"
但我需要这些功能
如何解决?
【问题讨论】:
标签: windows batch-file unzip 7zip