Brian,

 

What are you attempting to accomplish with the <includes … > tag ?

 

For any tag that accepts a sub-element of <fileset>, you can do the following

 

            <fileset>
                <includes name="${BaseDir}\**\*.cs" />
            </fileset>

The ** specifies to look in all subdirectories for the matching pattern.  Read the following page for more information

http://nant.sourceforge.net/help/types/fileset.html

 

Below are two different ways to locate a set of files

 

  <property name=”BaseDir” value=”C:\Projects” />

  <property name=”DestinationDir” value=”C:\Temp” />

 

  <mkdir dir=”${DestinationDir}” />


    <target name="use_foreach" >

 

  <foreach item="File" property="filename">
            <in>
                <items>
                    <includes name="${BaseDir}\**\*.cs" />
                </items>
            </in>
            <do>
                <copy file="${filename}" todir=”${DestinationDir}” />
            </do>
        </foreach>


    </target>

    <target name="use_fileset" >
        <copy todir=”${DestinationDir}” >
            <fileset>
                <includes name="${BaseDir}\**\*.cs" />
            </fileset>
        </delete>
    </target>

 

 

Noel Gifford

 

 

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Brian Beaudet
Sent: Thursday, April 08, 2004 10:50 AM
To: [EMAIL PROTECTED]
Subject: [Nant-users] Class Files All Over The Place

 

If I keep my *.cs files in different directories, is there a way to use <includes name=””> to recursively include all *.cs files in those subdirectories?

 

Brian M. Beaudet

Director, Research & Development

EfficiencyLab, LLC

www.efficiencylab.com

 

Reply via email to