ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Cannon-Brookes" <>
Subject Delete / Delfile limited?
Date Sun, 02 Apr 2000 04:45:24 GMT
Not sure if this is the right forum, but here goes.

I'm trying to build an Ant task to remove all temporary files from the
source tree before commiting it back to cvs. The way I would think it was
natural to do this is something along the following lines:

<target name="clean">
	<delete src="${srcdir}" includes="**/*~,**/*.bak,**/*.swp"/>

Alas neither the delete or deltree tags works like this (deleting specific
types of files from the tree).

So I'm doing it this way

<target name="clean">
	<mkdir dir="cleansrc" />
	<copydir src="${srcdir}" dest="cleansrc" defaultexcludes="no"
	<deltree dir="${srcdir}" />
	<mkdir dir="${srcdir}" />
	<copydir src="cleansrc" dest="${srcdir}" defaultexcludes="no" includes="**"
	<deltree dir="cleansrc" />

Which I'm sure you'll agree is unwieldy?

Is anyone else having this problem? Need this feature? I'm sure it would be
quite easy to add quickly for an Ant guru.


View raw message