You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Kitching Simon <Si...@orange.ch> on 2000/11/01 17:54:31 UTC

Deleting directories

Hi,

While upgrading from ant1.1 to ant1.2, I struck this problem I can't fix.

I have a structure like:

WEB-INF/classes (with one file, info.txt)
WEB-INF/classes/CVS
WEB-INF/classes/pkg1/...
WEB-INF/classes/pkg2/...

I want my "clean" target to delete any subdirectory of WEB-INF/classes
except the CVS directory.
I don't want it to delete the info.txt file in WEB-INF/classes.

I don't want to have to specify exactly what package directories might end
up in WEB-INF/classes.

It seems simple enough : delete every subdirectory of a directory (except
excluded dir CVS).
However, I just can't figure out the secret. I've tried:

(1)
<delete dir="WEB-INF/classes"/>

doesn't work; it deletes the whole classes directory.

(2)
<delete>
  <fileset dir="WEB-INF/classes" includes="*" excludes="info.txt/>
</delete>

Doesn't delete anything.



Any suggestions???

Many thanks,

Simon