ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erica A Ramsey" <earam...@wideopenwest.com>
Subject how to delete a file that matches a particular pattern?
Date Thu, 16 Aug 2007 23:18:14 GMT
Hello,
I have a file that I want to periodically delete from system. I don't know
it's exact name but I do know it's parent directory and pattern for it's
name. The pattern for it's name is 'DBS_*#*-' and let's just say that it's
location is somewhere under "${nokia.sdk.dir}". how do I find and delete all
files matching this pattern? If I was using windows port of unix find.exe I
would do the following;
   C:\project\>find
C:/Nokia/Devices/S60_3rd_MIDP_SDK/bin/epoc32/winscw/c/private -type f -name
DBS_*#*- -exec rm -f {} ;

however, my local environment has gnu32 unix port of find util on it
clientes, which is where it will ulitimately run, does not, so sticking that
command in build.xml file will not work. I don't think any of filters work
with delete task. any ideas?

Thanks
---
JavaME (J2ME), Java, C & C# Developer
CV: http://docs.google.com/Doc?id=dt6fqcn_51dn8gds


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


Mime
View raw message