title: Delete all files in a directory w/o subdirectories with Apache Ant
body: <p>I need an Apache Ant target that deletes all files in a directory but does not touch subdirectories.</p>
  
  <p>In my current approach I have to explicitly name the subdirectories I want to skip (atm just "src/").</p>
  
  <pre><code>&lt;delete&gt;
     &lt;fileset dir="${dist.dir}" excludes="src/" /&gt;
  &lt;/delete&gt;
  </code></pre>
  
  <p>But I don't like it. That way I would have to modify the target everytime something changes in the subdirectory structure.</p>
  
  <p>Any ideas?</p>