ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nico Seessle" <n...@apache.org>
Subject Re: Deleting dirs + files but keeping some files ?
Date Sat, 24 Feb 2001 15:46:12 GMT
----- Original Message -----
From: "Vincent Massol" <vmassol@octo.fr>
To: <ant-user@jakarta.apache.org>
Sent: Saturday, February 24, 2001 3:49 PM
Subject: Deleting dirs + files but keeping some files ?


> I'd like to delete all the files and subdirectories under the work/
> directory except the .keepit file. Is it possible with the delete task ?
> I have tried several combinations with no success, the best one I have
found
> is :
>
>         <delete includeEmptyDirs="on">
>             <fileset dir="." excludes=".keepit">
>                 <include name="${misc.dir}/jbuilder/**/work/**"/>
>             </fileset>
>         </delete>
>

Have you also tried something like

         <delete includeEmptyDirs="on">
             <fileset dir=".">
                 <include name="${misc.dir}/jbuilder/**/work/**"/>
                 <exclude name="**/.keepit"/>
             </fileset>
         </delete>

Nico


Mime
View raw message