title: Ant target to move directories out of another directory
body: <p>What is the simplest way to move everything out of a target directory?</p>
  
  <p>I have this <code>basedir/parentdir/&lt;subdir&gt;</code>. I have many different <code>&lt;subdir&gt;</code>. I need to move them out into the same level as <code>parentdir</code> so that it becomes <code>basedir/&lt;subdir&gt;</code>. Now, each <code>&lt;subdir&gt;</code> contains a deep tree of many other subdirectories and files, including empty subdirectories.</p>
  
  <p>I've tried the following:</p>
  
  <pre><code>&lt;move todir="basedir"&gt;
      &lt;fileset dir="parentdir"&gt;
          &lt;include name="**/*.*" /&gt;
      &lt;/fileset&gt;
  &lt;/move&gt;
  </code></pre>
  
  <p>That failed to move the empty directories - meaning after the move, all the <code>&lt;subdir&gt;</code> are missing their empty subdirectories. "move" supposedly copies emptysubdirectories by default, so I tried the following next:</p>
  
  <pre><code>&lt;move todir="basedir"&gt;
      &lt;fileset dir="parentdir"&gt;
          &lt;include name="**/*" /&gt;
          &lt;include name="**/*.*" /&gt;
      &lt;/fileset&gt;
  &lt;/move&gt;
  </code></pre>
  
  <p>While I did manage to move the empty subdirectories, the strange thing is that all the immediate subdirectories of all the <code>&lt;subdir&gt;</code> gets copied into <code>basedir</code>. Every <code>&lt;subdir&gt;</code> has <code>src</code>, <code>test</code>, and <code>build</code>. These are now sitting in <code>basedir</code> as well as in their original moved <code>&lt;subdir&gt;</code>.</p>
  
  <p>I'm positive I'm doing something wrong but I don't know what. Am I approaching things the wrong way?</p>