Java 如何使用ApacheAnt解压多个卷zip文件?
我有一个超过100MB的文件Java 如何使用ApacheAnt解压多个卷zip文件?,java,ant,unzip,Java,Ant,Unzip,我有一个超过100MB的文件 some-archive.bin 我使用7z创建了这个文件的多个卷(使用zip格式)。生成的卷如下所示 some-archive.zip.001 some-archive.zip.002 我需要使用ApacheAntV1.9.3解压所有这些卷以恢复原始文件。我尝试了下面的方法,但没有成功 <unzip src="some-archive.zip.001" dest="output-dir"/> 这是ant不支持的东西吗?也就是说,我是否需要
- some-archive.bin
- some-archive.zip.001
- some-archive.zip.002
<unzip src="some-archive.zip.001" dest="output-dir"/>
这是ant不支持的东西吗?也就是说,我是否需要编写自己的ant任务来完成此任务 假设您已压缩了some-archive.bin文件,然后将some-archive.zip文件拆分为多个卷,您可以使用任务,将binary设置为true,并指定destfile,以便将卷合并回单个zip文件。然后使用任务解压some-archive.zip
<target name="merge-and-unzip">
<concat destfile="some-archive.zip" binary="true">
<fileset dir=".">
<include name="some-archive.zip.*"/>
</fileset>
</concat>
<unzip dest="." src="some-archive.zip"/>
</target>
请参见答案和此