ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Lawson" <>
Subject Deleting directories
Date Mon, 26 Feb 2001 14:49:38 GMT
Firstly, apologies for what (I hope) is a simple question.

I am simply trying to delete the contents (files and sub-directories) of a
number of directories.
ant appears to be ignoring the contents of my target.

The code is as follows:

<target name="clearup">
	<delete verbose="true">
		<!-- delete everything from /variable1/dir1 -->
		<fileset dir="${variable1}/dir1/">
			<include name="**" />
		<!-- delete everything from /variable2 -->
		<fileset dir="${variable2}/">
			<include name="**" />
		<!-- delete directory /variable1/dir2/variable3 -->
		<fileset dir="${variable1}/dir2/">
			<include name="${variable3}" />

The variables are all defined and work in other targets.

Other things I've tried (without success):
defaultexcludes="no" - deprecated
comma separated list instead of filesets
One "delete" for every dir
	<delete dir="${variable1}/dir1/">
	<delete dir="${variable2}/">
	<delete dir="${variable1}/dir2/${variable3}"

I don't believe it's file permissions as I'm running ant as root and root
owns the directories and files in question.

Any ideas what I'm doing wrong? I'm going daft!



View raw message