ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: deleting specific directories...
Date Fri, 27 Jun 2003 13:22:30 GMT
On Fri, 27 Jun 2003, David McTavish <> wrote:

> Perhaps you could use the ForEach task from ant-contrib and iterate
> through each file and call a target that will delete the parent.

Yes, easily - and Jan already provided that solution IIRC, but the
original requester didn't like it, it seemed.

This has one caveat, though.  Say I want to delete all directories
that contain a file named foo and I have a structure like this

  ----> foo
  ----> level2/
          ---------> foo

both level1 and level2 will be matched, but the way Ant works,
<foreach> will invoke the target for level1 before it invokes it for
level2 - ending up trying to delete a directory that's no longer
preset (OK, quiet="true" should help here).


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

View raw message