Use dirset as follows:
<dirset dir="dir" includes="*"/>
or
<dirset dir="dir1"> <include name="*"/> </dirset>
EDIT after comment
includes attribute and nested include name should be equivalent, here are some snippet running on my windows machine, given C: \ foo \ bar:
<project> <echo> ${ant.version} ${java.version} ${os.name} </echo> <dirset dir="c:/foo" includes="*" id="foobar" /> <echo>${toString:foobar}</echo> <dirset dir="c:/foo" id="foobaz"> <include name="*" /> </dirset> <echo>${toString:foobaz}</echo> </project>
:
Buildfile: C:\rosebud\AntTest\tryme.xml [echo] Apache Ant(TM) version 1.8.2 compiled on December 20 2010 [echo] 1.7.0_02 [echo] Windows 7 [echo] [echo] bar [echo] bar BUILD SUCCESSFUL
source share