ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <DDevie...@lgc.com>
Subject RE: deleting backup files?
Date Fri, 08 Oct 2004 18:46:42 GMT
Oh, didn't notice you put me in To: instead of the list...

It's possible you are on Windows, and the files are in use,
And this cannot be deleted?! --DD

> -----Original Message-----
> From: Dominique Devienne
> Sent: Friday, October 08, 2004 1:41 PM
> To: 'Greg Wilson'
> Subject: RE: deleting backup files?
> 
> > From: Greg Wilson [mailto:gvwilson@cs.toronto.edu]
> >
> > Hi Dominique.  That doesn't seem to do it; I've changed the task to:
> >
> >     <target name="clean"
> >             description="Clean up generated artifacts">
> >         <delete dir="${gen}"/>
> >         <delete dir="${class}"/>
> >         <delete dir="${data}"/>
> >         <delete>
> >             <fileset dir="${basedir}" defaultexcludes="no">
> >                 <include name="**/*~"/>
> >             </fileset>
> >         </delete>
> >     </target>
> >
> > and it's still not deleting the "*~" files.
> 
> I can't reproduce your pb with the test below.
> It's working for me... I'm using Ant 1.6.2. --DD
> 
> <?xml version="1.0"?>
> 
> <project name="delete-tilda">
> 
>   <target name="clean">
>     <delete dir="build/${ant.project.name}" quiet="true" />
>   </target>
> 
>   <target name="setUp">
>     <mkdir dir="build/${ant.project.name}/a/b" />
> 
>     <property name="tilda" location="build/${ant.project.name}/foo~"
/>
>     <echo file="${tilda}">bar</echo>
> 
>     <property name="tilda2"
location="build/${ant.project.name}/a/b/bar~"
> />
>     <echo file="${tilda2}">foo</echo>
>   </target>
> 
>   <target name="delete" depends="setUp">
>     <!-- pre-conditions -->
>     <available property="found before" file="${tilda}" />
>     <fail unless="found before">Error: File not found: ${tilda}</fail>
> 
>     <available property="found before2" file="${tilda2}" />
>     <fail unless="found before2">Error: File not found:
${tilda2}</fail>
> 
>     <delete>
>       <fileset dir="build/${ant.project.name}" defaultexcludes="no">
>         <include name="**/*~" />
>       </fileset>
>     </delete>
> 
>     <!-- post-conditions -->
>     <available property="found after" file="${tilda}" />
>     <fail if="found after">Error: File not deleted: ${tilda}</fail>
> 
>     <available property="found after2" file="${tilda2}" />
>     <fail if="found after2">Error: File not deleted: ${tilda2}</fail>
>   </target>
> 
> </project>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message