ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject RE: Deleting files that are X days old
Date Wed, 17 Apr 2002 20:55:41 GMT
--- Mike Lecza <> wrote:
> This script works great but now I want to delete entire directories.  Is
> there a wat to check the date on a subdirectory then delete the entire
> thing if it is old?

I'm glad it's working for you (although I hope you've made it a bit more
robust and added some error-checking :)

Just pass it a directory name instead of a set of files -- if <delete> is
given a directory, it'll 'rm -rf *' it. (Be careful! :)  If you want to
pass it a set of directories, 1.5alpha has a new <dirset> datatype. Also,
since the attribute name is different ('file' vs. 'dir'), you'll need to
add a check for whether it's a directory that's being deleted.



Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax

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

View raw message