title: Extracting nested zip archives with Ant
body: <p>I need to process a zip archive which itself contains zip archives which all follow the same structure:</p>
  
  <pre><code>main.zip/
    foo-1.txt
    foo-1.zip/
      ... 
      tests/
      ...
    bar-1.txt
    bar-1.zip/
      ... 
      tests/
      ...
    bar-2.txt
    bar-2.zip/
      ... 
      tests/
      ...
    foobar-1.txt
    foobar-1.zip/
      ... 
      tests/
      ...
  </code></pre>
  
  <p>I want to extract the <code>txt</code> files and the <code>tests</code> directories into a structure like this:</p>
  
  <pre><code> foo/
     1/
       submission.txt
       tests/
   bar/
     1/
       submission.txt
       tests/
     2/
       submission.txt
       tests/
   foobar/
     1/
       submission.txt
       tests/
  </code></pre>
  
  <p>I managed to get the directory structure and the text files into the right place:</p>
  
  <pre><code>&lt;target name="extract submissions"&gt;
    &lt;copy todir="${basedir}"&gt;
      &lt;zipfileset refid="submissions.zip"/&gt;
  &lt;mapper type="regexp" from="(.*)-(.*)\.txt" to="\1/\2/\submission.txt"/&gt;
    &lt;/copy&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p>But now I am stuck how to access the tests directory inside the inner zips. I tried an intermediate step where I copied the inner zips into the place where the tests directories should end up. But how can I access the content of a zip archive without knowing its exact path?</p>