title: How to copy subdirectories of multiple un-named directories
body: <p>Using just Ant, I want to copy subdirectories of some top-level directories but the names of top-level directories can change so I need Ant to programatically determine which directories to copy.</p>
  
  <p>In other words, given the sample directory structure below, copy the contents of each <code>./&lt;projectX&gt;/bin</code> directory to <code>./bin</code>.</p>
  
  <pre><code>bin
  project1
     \-- bin
          \-- com
               \-- name
                    \-- dir1
                          \-- file1.class
                          \-- file2.class
                          \-- file3.class
                    \-- dir2
                          \-- file4.class
                          \-- file5.class
  project2
     \-- bin
          \-- com
               \-- name
                    \-- dir3
                          \-- file6.class
                          \-- file7.class
                          \-- file8.class
  project3
     \-- bin
          \-- com
               \-- name
                    \-- dir4
                          \-- file9.class
                    \-- dir5
                          \-- file10.class
                          \-- file11.class
  </code></pre>
  
  <p>And the end result would be a bin directory that looks like this:</p>
  
  <pre><code>bin
    \-- com
         \-- name
              \-- dir1
                    \-- file1.class
                    \-- file2.class
                    \-- file3.class
              \-- dir2
                    \-- file4.class
                    \-- file5.class
              \-- dir3
                    \-- file6.class
                    \-- file7.class
                    \-- file8.class
              \-- dir4
                    \-- file9.class
              \-- dir5
                    \-- file10.class
                    \-- file11.class
  </code></pre>
  
  <p>I've tried</p>
  
  <pre><code>    &lt;copy todir="${basedir}/bin"&gt;
          &lt;fileset dir="${basedir}"&gt;
              &lt;include name="**/bin/*"/&gt;
              &lt;exclude name="bin"/&gt;
          &lt;/fileset&gt;
      &lt;/copy&gt;
  </code></pre>
  
  <p>but that includes the <code>projectX/bin</code> directories underneath the top-level bin directory.</p>