ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stephan beal <>
Subject Re: new to ant
Date Thu, 21 Mar 2002 15:04:08 GMT
On Thursday 21 March 2002 16:10 pm, Chan-wa Fong wrote:
> I would like to know does anyone know how to delete all files that are
> under a directory such as
> c:\tomcat\common\class\?

it's normally easiest just to delete the directory:
<delete dir="${env.deployClassesDir}"/>
<mkdir dir="${env.deployClassesDir}"/>

This also saves you from having to handle .xml files (for example) which may 
also get put into your output directory. Just nuke the whole dir and 
re-create it.

> I used this  <delete file="${deployClassesDir}/*.*"/> to try to delete all
> the files that are under this directory but it did not work.

i think you'd need:
  <fileset dir="${deployClassesDir}">
    <include name="**/*"/>

----- stephan
Generic Universal Computer Guy -
Office: +49 (89)  552 92 862 Handy:  +49 (179) 211 97 67
"I ain't gen'rally given to physicality of that nature but it saves
a lot of arguing." -- Nanny Ogg

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

View raw message