ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David McTavish <>
Subject RE: deleting specific directories...
Date Fri, 27 Jun 2003 13:13:41 GMT
Could you use the available condition and call an external task using if?


<available property="file.exists" file="xxx"/>
<antcall target="delete.dir"/>

<target name="delete.dir" if="file.exists">
	<delete dir="${}/.."/>

Although, I imagine you're using a fileset to determine the list of files...
Perhaps you could use the ForEach task from ant-contrib and iterate through
each file and call a target that will delete the parent. 

<foreach target="delete.dir" param="">
       <fileset .../>


-----Original Message-----
From: Stefan Bodewig []
Sent: Friday, June 27, 2003 9:03 AM
Subject: Re: deleting specific directories...

On Fri, 27 Jun 2003, Rob van Oostrum <> wrote:

> <containsregexp> should do it right?

<containsregexp> looks into the files - the request is to match on
file names.  And in particular, do not delete the matched files, but
its parent directory.  I've tried to come up with a combination of
existing selectors but failed.


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

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

View raw message