Gert,
I'd like a parameter added to the delete task (or maybe the fileset task)
specifying whether directories should be deleted.
When I used the <fileset> task I expected only the files to be removed.
Bob,
I sent this back on April 5th. Guess it didn't get through.
Bob,
The script below in target "use_foreach" will delete all files below
${DelDir} and leave the directories in place.
I tried to get it to work using target "use_fileset" but the directories
always got deleted.
<project name="TestDelete" default="Default">
<property name="DelDir" value="C:\Projects\TestDel" />
<target name="use_foreach" >
<foreach item="File" property="filename">
<in>
<items>
<includes name="${DelDir}\**" />
</items>
</in>
<do>
<delete file="${filename}" />
</do>
</foreach>
</target>
<!--
<target name="use_fileset" >
<delete>
<fileset>
<includes name="${DelDir}\**" />
</fileset>
</delete>
</target>
-->
</project>
Thanks,
Noel
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Bob Archer
Sent: Friday, April 30, 2004 10:24 AM
To: [EMAIL PROTECTED]
Subject: RE: [Nant-users] delete all files and folders in a directory
I guess I should clarify this:
I still can't seem to delete all files and folders in a directory...
WITHOUT deleting that directory.
BOb
_____
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bob Archer
Sent: Friday, April 30, 2004 2:11 PM
To: [EMAIL PROTECTED]
Subject: [Nant-users] delete all files and folders in a directory
I still can't seem to delete all files and folders in a directory... what is
the correct pattern. Here is what I have:
<delete failonerror="true" verbose="false">
<fileset>
<includes
name="\\qaevolution2003\wwwroot\Geac.QA\**" />
<excludes
name="\\qaevolution2003\wwwroot\Geac.QA\dev.config" />
</fileset>
</delete>
<<attachment: winmail.dat>>
