title: ANT select a file based on pattern, move to dest and rename
body: <p>I'm trying to copy files under all the directory startting at the root folder that ends with _${env}.xml and strip the _${env} from the filename if found or copy the xml file whichever is present in the directory.I can't get this to work please help.(possibly i need a move and mapper to rename and I somehow can't weave them together.)</p>
  
  <pre><code>&lt;target name="main"&gt;
      &lt;copy todir="qa-wprelease"&gt; 
          &lt;fileset  dir="bin-debug" includes="**/*.xml"&gt; 
              &lt;or&gt;
                  &lt;filename name="*_${env}.xml"/&gt; 
                  &lt;filename name="*.xml" /&gt;
              &lt;/or&gt;
          &lt;/fileset&gt;
      &lt;/copy&gt; 
  &lt;/target&gt;
  </code></pre>