Re: Recursive delete in ANT
From: Oscar kind (oscar_at_danwa.net)
Date: Fri, 11 Jun 2004 23:58:28 +0200
dreamzzz <email@example.com> wrote:
> "Tony Morris" <firstname.lastname@example.org> wrote in message news:<email@example.com>...
>> "dreamzzz" <firstname.lastname@example.org> wrote in message
>> > Is it possible to recursively delete all dirs and sub-dirs in a tree
>> > structure?
>> > I am trying to use the Fileset and delete all the directories along
>> > with their contents. But it just deletes the contents of the dirs at
>> > the lowest level and not the entire Dir structure.
>> <delete dir="thedirectory"/>
> I tried the above technique. But it doesnt solve my problem.
> Actually I have a dir tree and i need to delete specific dirs in that
> dir. These dirs can have sub or sub-sub dirs. Thats why i am using
> fileset with Includes clause. But this just removes the contents at
> the lowest level and not the entire dir structure specified.
You may want to look at dirset. It does the same as a fileset, but with
directories. IIRC, it also works with the delete task.
-- Oscar Kind http://home.hccnet.nl/okind/ Software Developer for contact information, see website PGP Key fingerprint: 91F3 6C72 F465 5E98 C246 61D9 2C32 8E24 097B B4E2