title: Ant copy directory if file found in directory
body: <p>I've been using simple copy to grab a paticular file out of a directory:</p>
  
  <pre><code>&lt;copy todir="target/failures"&gt;
      &lt;fileset dir="target/reports" includes="**/*FAILED.txt"/&gt;
  &lt;/copy&gt;
  </code></pre>
  
  <p>Now instead I'd like to copy the entire folder that contains this file to the failures folder. 
  The directory structure looks like this:</p>
  
  <pre><code>target
      reports
          folder1
          folder2
          folder3
      failures
  </code></pre>
  
  <p>So if a failure is found in folder1, i want to copy the entire contents to failures and then continue on through the remaining folders.  It seems like it should be simple but I can't seem to find a built in task to accomplish this, any ideas?</p>