ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: Deleting filesets with directories
Date Tue, 16 Jul 2002 14:39:01 GMT
I think "**/tmpdir/" is just a short hand of "**/tmpdir/**". Your other
patterns do not some match files inside the tmpdirs, thus the directories
are not empty, thus they're not deleted. I'd guess you have subdirectories
in your tempdir, which is why "**/tmpdir/*" didn't work (did not match any
files in a subdirectory).

A little confusing yes, but totally ant-normal... --DD

-----Original Message-----
From: Mark Reid [] 
Sent: Monday, July 15, 2002 10:54 PM
To: Ant Users List
Subject: Deleting filesets with directories

Hi all,

I've come across this frustrating little problem in Ant1.5b1 and was
wondering if it could and/or should be fixed in the next release of Ant. 

I have a number of temporary directories the following directory structure:

I thought I could delete all the tmpdirs with this Ant task:

<delete includeEmptyDirs="true">
    <fileset dir="topdir" includes="**/tmpdir"/>

but this does nothing. Then I tried this (notice the additional /* in the
includes attribute):

<delete includeEmptyDirs="true">
    <fileset dir="topdir" includes="**/tmpdir/*"/>

and finally this (removed the * from the above task):

<delete includeEmptyDirs="true">
   <fileset dir="topdir" includes="**/tmpdir/"/>

This last one did what I wanted, which was to delete the tmpdirs and all
their contents from each of dirA, dirB and dirC.

Is it just me, or should the first of these three examples done the same


Mark Reid
Proxima Technology, Inc.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message