ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Lecza" <mle...@newnetco.com>
Subject RE: Deleting files that are X days old
Date Thu, 18 Apr 2002 12:32:15 GMT
Great Thanx.  I am using 1.5alpha anyway so I'll checkout the dirset
type.



-----Original Message-----
From: Diane Holt [mailto:holtdl@yahoo.com] 
Sent: Wednesday, April 17, 2002 4:56 PM
To: Ant Users List
Subject: RE: Deleting files that are X days old

--- 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>


--
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