You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jack Woehr <ja...@purematrix.com> on 2001/08/22 21:48:10 UTC
Delete patterns
I wasn't able to figure out a way to abstract deleting a pattern of directories
in the Delete task. Maybe someone can clue me!
In a directory A I have subdirs AA, BB, CC ...
I want to delete AA BB CC but not DD.
With a fileset, I delete the files in AA BB CC but not the dirs.
With Delete directly, I have to have a <delete/> tag for each dir.
How do I pattern this please?
--
Jack J. Woehr # "I never worry that all hell will break loose.
Senior Consultant # I worry that half hell will break loose, which
Purematrix, Inc. # is much harder to detect." - George Carlin
Re: Delete patterns
Posted by Stefan Bodewig <bo...@apache.org>.
On Wed, 22 Aug 2001, Jack Woehr <ja...@purematrix.com> wrote:
> In a directory A I have subdirs AA, BB, CC ...
> I want to delete AA BB CC but not DD.
<delete includeEmptyDirs="true">
<fileset dir="A">
<include name="AA/**" />
<include name="BB/**" />
<include name="CC/**" />
</fileset>
</delete>
or alternatively
<delete includeEmptyDirs="true">
<fileset dir="A">
<exclude name="DD/**" />
<exclude name="DD" />
</fileset>
</delete>
and use Ant 1.4beta as includeEmptyDirs has a bug in Ant 1.3.
Stefan