ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@octo.fr>
Subject Deleting dirs + files but keeping some files ?
Date Sat, 24 Feb 2001 14:49:55 GMT
Hi,

I have the following directory structure :

<root>
  |_ misc/jbuilder/servlet21/work
    |_ .keepit
    |_ <some dirs>
      |_ <some files>
  |_ misc/jbuilder/servlet22/work
    |_ .keepit
    |_ <some dirs>
      |_ <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>

but it also deletes the .keepit file.

Any idea ?
Thanks a lot.
Vicnent.



Mime
View raw message