1

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?

Jane Wayne
  • 8,205
  • 17
  • 75
  • 120
  • http://stackoverflow.com/questions/8116443/how-do-you-uncompress-a-split-volume-zip-in-java see the answer and this http://stackoverflow.com/questions/2823187/how-do-you-use-ant-to-unjar-multiple-jar-files-and-rebuild-them-into-one-jar-fil – StanislavL Mar 31 '14 at 06:47

1 Answers1

2

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> 
Mads Hansen
  • 63,927
  • 12
  • 112
  • 147