Board logo

标题: [文件操作] 【已解决】怎么批量解压多个压缩包到同名文件夹 [打印本页]

作者: torrent151221    时间: 2016-7-1 16:28     标题: 【已解决】怎么批量解压多个压缩包到同名文件夹

本帖最后由 torrent151221 于 2016-7-8 14:14 编辑

要解压一些压缩包,个数和名称未定,这些文件共同点是 都是以and开头的压缩包,即:and*.zip
例如:and-001.zip; and.p-005.zip; and-007-2016.zip,不一定是3个,这里举3个
想要把他们解压到同名文件夹,即各自解压到and-001; and.p-005; and-007-2016
for %%i in (and*.zip) do unzip -o and*.zip -d %%~ni
使用的unzip.exe工具
运行结果发现,当前目录出现了3个文件夹and-001; and.p-005; and-007-2016,但是文件夹三个文件夹里内容一样,都包含了001 005 007三个压缩包的内容
请问下,应该怎么解决这问题呢,多谢
作者: GNU    时间: 2016-7-1 17:53

  1. for %%i in (and*.zip) do unzip -o "%%i" -d "%%~ni"
复制代码

作者: torrent151221    时间: 2016-7-4 09:12

回复 2# GNU

果然好用,谢谢




欢迎光临 批处理之家 (http://www.bathome.net/) Powered by Discuz! 7.2