On Fri, 27 Jun 2003, David McTavish <[EMAIL PROTECTED]> 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

level1/
  |
  ----> 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).

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to