Hi, I use NAnt 0.85 (Build 0.85.2013.0; nightly; 06.07.2005) and I have tried to use the foreach task to recursively copy the directory structure of a source directory to a destination directory and do some transformation on the contained files:
<foreach item="Folder" property="foldername"> <in> <items basedir="${from.dir}" > <include name="**"/> </items> </in> <do> <echo message="${foldername}"> <!-- mkdir dir="${to.dir}/${foldername}" / --> <!-- further processing on files in this folder --> </do> </foreach> My problem is that the ${foldername} property contains the full qualified path. I could use string functions to cut of the basedir part but as I use the basedir attribute in the fileset I would expect to get only the path fraction without the basedir part. Is this a bug or is this by design ? Thank you for your hints Klaus BTW: Is it possible to use the copy task to copy only the directory structure of a directory (without files) ? I tried the following, but it doesn't work: <copy verbose='true' todir="${to.dir}"> <fileset basedir="${from.dir}"> <include name="**/*." /> </fileset> </copy> ------------------------------------------------------- This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual core and dual graphics technology at this free one hour event hosted by HP, AMD, and NVIDIA. To register visit http://www.hp.com/go/dualwebinar _______________________________________________ Nant-users mailing list Nant-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users