title: Match subdirectories with wildcards using Apache Ant?
body: <p>I'm trying to setup a build file and I was curious if you can use wildcards in a property to denote filepaths?  Or what a better way to tackle this problem is?</p>
  
  <p>As you can see below I want all the files or directories in <code>${dirtwo}</code> that start with "foo-" to be resolved, versus having to manually include each directory/file as a property.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;project name="core" default="build" basedir="."&gt;
    &lt;property name="dirone" value="path/to/dir/one" /&gt;
    &lt;property name="dirtwo" location="path/to/dir/two/foo-*" /&gt;
  
    &lt;target name="phpmd" description="Generate pmd.xml using PHPMD"&gt;
      &lt;exec executable="phpmd"&gt;
        &lt;arg line="${dirone},${dirtwo}
                   xml
                   codesize,design,naming,unusedcode
                   --reportfile ${basedir}/build/logs/pmd.xml" /&gt;
      &lt;/exec&gt;
    &lt;/target&gt;
    ...
  &lt;/project&gt;
  </code></pre>
  
  <p>Currently, all I get are errors no matter how I try to use a wildcard or escape one.</p>
  
  <pre><code>Buildfile: /var/www/server/project/build.xml
  
  phpmd:
       [exec] The given file "/var/www/server/project/path/to/dir/two/foo-*" does not exist.
       [exec] Result: 1
  </code></pre>