ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: Directory delete question
Date Thu, 29 Mar 2001 15:15:53 GMT

I tried this but I get a message saying that Class doesn't support the
"includeemptydirs" attribute.  I deleted this and got all the files
deleted, but none of the directories.


KC Baltz <> on 03/29/2001 07:28:50 AM

Please respond to

To:   "''" <>

Subject:  RE: Directory delete question

Ideally, the following should work in Ant 1.3

<delete >
     <fileset dir="rootOfBuildDirs" includeEmptyDirs="yes" >
          <include name="build*/**" />

However, there was a bug with includeEmptyDirs when 1.3 was released that
causes it to not remove directories if they have subdirectories, even if
those subs are empty.  It has been fixed since and you could patch your
to work.  But try they above, see if it fixes it for you.


> -----Original Message-----
> From: []
> Sent: Wednesday, March 28, 2001 6:58 PM
> To:
> Subject: Directory delete question
> I've just downloaded Ant and have found it very useful for
> keeping track of
> different
> builds, but I was wondering how to delete a number of
> directories.  I'm
> building
> buildyyyymmdd.hhmm directories and at some point later I want
> to be able to
> delete
> them so I really want something like this
>   <target name="cleanall">
>     <delete dir="build*" />
>   </target>
> I looked at FileSets but that seems to only include files,
> same with include.
> Thanks
> Eric

View raw message