I did a few tests and it appears that the following is finding only bin
and obj folders.
<delete>
<fileset basedir="${folder}">
<include name="**\bin" />
<include name="**\obj" />
</fileset>
</delete>
Unfortunately, NAnt doesn't delete the folders. I suspect that this is
because the folders are not empty. The help suggests that I can specify
a folder to be deleted with all of its sub-folders. This obviously is
not true when using a fileset. I haven't tested this using the 'dir'
attribute.
For now, I'm using the following which works for me:
<delete>
<fileset basedir="${folder}">
<include name="**\bin\**" />
<include name="**\obj\**" />
</fileset>
</delete>
The folders are left behind, but the content goes away and that is my
primary goal.
--Edwin
> -----Original Message-----
> From: Gert Driesen [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 30, 2004 12:18 AM
> To: 'Matthew Mastracci'; Castro, Edwin Gabriel (Firing Systems Engr.);
> [EMAIL PROTECTED]
> Subject: RE: [Nant-users] Re: FileSet Behavior
>
>
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of
> > Matthew Mastracci
> > Sent: dinsdag 30 november 2004 6:34
> > To: Castro, Edwin Gabriel (Firing Systems Engr.);
> > [EMAIL PROTECTED]
> > Subject: [Nant-users] Re: FileSet Behavior
> >
> > Try the latest nightlies - the original bug should be fixed.
>
> Edwin appears to be using the latest nighty :(
>
> Matthew, can you have a look at this ?
>
> >
> > Castro, Edwin Gabriel (Firing Systems Engr.) wrote:
> > > A little update:
> > >
> > > I thought I would be smart by trying to exclude the files
> > with bin and
> > > obj extensions. Like this:
> > >
> > > <delete>
> > > <fileset basedir="${folder}">
> > > <include name="**\bin" />
> > > <include name="**\obj" />
> > > <exclude name="**\*.bin" />
> > > <exclude name="**\*.obj" />
> > > </fileset>
> > > </delete>
> > >
> > > I found out this doesn't work as I hoped. The excludes match all
the
> > > files and directories that were matched in the includes and
> > nothing gets
> > > deleted. On the other hand, this behavior seems logical given the
> > > current implementation.
> > >
> > > I'm using NAnt 0.85 (Build 0.85.1793.0; nightly; 11/28/2004)
> > >
> > > --Edwin
> > >
> > >
> > >>-----Original Message-----
> > >>From: [EMAIL PROTECTED] [mailto:nant-users-
> > >>[EMAIL PROTECTED] On Behalf Of Castro, Edwin Gabriel
> > >
> > > (Firing
> > >
> > >>Systems Engr.)
> > >>Sent: Tuesday, November 23, 2004 1:19 PM
> > >>To: [EMAIL PROTECTED]
> > >>Subject: [Nant-users] FileSet Behavior
> > >>
> > >>I'm using NAnt 0.85 (Build 0.85.1783.0; nightly; 11/18/2004)
> > >>
> > >>I noticed that when I use a fileset similar to the following:
> > >>
> > >><delete>
> > >> <fileset basedir="${folder}">
> > >> <include name="**\bin" />
> > >> <include name="**\obj" />
> > >> </fileset>
> > >></delete>
> > >>
> > >>the fileset is matching bin and obj folders as expected but
> > also files
> > >>with bin and obj extensions! Is this behavior intended? If so, how
> > >
> > > would
> > >
> > >>I distinguish between folders and files with those extensions?
> > >>
> > >>--Edwin
> > >>
> > >>
> > >>-------------------------------------------------------
> > >>SF email is sponsored by - The IT Product Guide
> > >>Read honest & candid reviews on hundreds of IT Products from real
> > >
> > > users.
> > >
> > >>Discover which products truly live up to the hype. Start
> > reading now.
> > >>http://productguide.itmanagersjournal.com/
> > >>_______________________________________________
> > >>Nant-users mailing list
> > >>[EMAIL PROTECTED]
> > >>https://lists.sourceforge.net/lists/listinfo/nant-users
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > SF email is sponsored by - The IT Product Guide
> > > Read honest & candid reviews on hundreds of IT Products
> > from real users.
> > > Discover which products truly live up to the hype. Start
> > reading now.
> > > http://productguide.itmanagersjournal.com/
> >
> >
> >
> > -------------------------------------------------------
> > SF email is sponsored by - The IT Product Guide
> > Read honest & candid reviews on hundreds of IT Products from
> > real users.
> > Discover which products truly live up to the hype. Start reading
now.
> > http://productguide.itmanagersjournal.com/
> > _______________________________________________
> > Nant-users mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/nant-users
> >
> >
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users