ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Reeves" <CRee...@medfusion.net>
Subject RE: Direcotry Delete based on pattern
Date Mon, 17 Mar 2003 22:00:20 GMT
Can I use a mapper inside a <delete>? Regexp would work to find the
files, I believe.

Chris

> -----Original Message-----
> From: Chaganthi, Madhusudan R. [mailto:mvc9@cdc.gov] 
> Sent: Monday, March 17, 2003 4:44 PM
> To: 'Ant Users List'
> Subject: RE: Direcotry Delete based on pattern
> 
> 
> I dont know if a task exists as such.
> 
> But maybe you can use a few of the existing tasks combined to do this.
> 
> 
> PSEUDO-CODE
> Can you not get the name of each directory and parse it into an int.
> 
> If the parsing goes fine, delete that directory
> 
> If parsing throws a FormatException or something on those 
> lines, leave that directory alone.
> 
> 
> 
> Either way, I would appreciate the solution you turn to.
> 
> Regards
> 
> Madhu
> 
> -----Original Message-----
> From: Chris Reeves [mailto:CReeves@medfusion.net]
> Sent: Monday, March 17, 2003 4:37 PM
> To: user@ant.apache.org
> Subject: Direcotry Delete based on pattern
> 
> 
> I have a load of directories, all with numeric names (e.g. 123, 734,
> 231) - hundreds of them.
> 
> I need to delete all these directories, while leaving any 
> directories with non-numeric names intact.
> 
> I thought I could use a patternset, but that won't do it. Any 
> suggestions?
> 
> Chris
> 
> ----------------------------------------
> Chris Reeves
> Senior Software Developer
> Medfusion, Inc.
> creeves@medfusion.net
> ----------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 

Mime
View raw message