ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject RE: Deleting files that are X days old
Date Wed, 17 Apr 2002 20:55:41 GMT
--- Mike Lecza <mlecza@newnetco.com> 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.

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message