Question

i have a single file that's over 100 Mb

  • some-archive.bin

i've used 7z to create multiple volumes of this single file (using zip format). the resulting volumes look something like the following.

  • some-archive.zip.001
  • some-archive.zip.002

i need to use apache ant v1.9.3 to unzip all these volumes to recover the original file. i tried something like the following, which didn't work.

<unzip src="some-archive.zip.001" dest="output-dir"/>

is this something that is not supported out of the box by ant? meaning, will i have to write my own ant task to accomplish this?

Was it helpful?

Solution

Assuming that you had zipped the some-archive.bin file and then split the some-archive.zip file into multiple volumes, you could use the concat task with binary set to true and a destfile specified in order to merge the volumes back into a single zip file. Then unzip the some-archive.zip with the unzip task.

<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> 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top