ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <>
Subject Re: AW: use fileinfo in ant
Date Tue, 07 Dec 2004 20:54:31 GMT
--- wrote:
> I first need to delete all the files in the
> directories, then I delete
> all the empty folders, here is my code:

If you care to go beyond basic Ant, you could use
ant-contrib's <for>:

(having tied the "ac" ns to the antcontrib antlib)

<ac:for param="d">
  <dirset dir="${release}">
    <date datetime="${sevenDaysAgo}" when="before" />
    <delete dir="@{d}" />

This version presumes that the timestamps on the
directories themselves are reliable for your purposes.
 In all honesty I don't completely understand the
timestamps of directories but your question seemed to
imply that you were looking for a solution of this

Hope it helps,

Do you Yahoo!? 
Yahoo! Mail - You care about security. So do we.

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

View raw message