that is what I was looking for!!!!

thanks,
Glen

----- Original Message -----
From: "Erik Hatcher" <[EMAIL PROTECTED]>
To: "Ant Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, May 15, 2002 3:18 PM
Subject: Re: deleting a file if it does or does not exist


> You could set failonerror="false".
>
>
> ----- Original Message -----
> From: "Glen Marchesani" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, May 15, 2002 9:08 AM
> Subject: deleting a file if it does or does not exist
>
>
> Hello I have a newbie question,
>
> I want to delete a file (part of my clean task) but the file isn't
> guaranteed to be there.  I currently use
>
>   <delete file="generated.jar"/>
>
> This only works if the file does exist if it doesn't I get an error
>
> "D:\foo\build.xml:295: Unable to delete file D:\foo\generated.jar"
>
> As a work around I did this.
>
> <delete>
>        <fileset dir="." includes="**/generated.jar.*"/>
> </delete>
>
>
> I am looking to learn of better ways to do the file deletion if it exists
> and not fail if it doesn't.
>
> regards,
> Glen
>
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


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

Reply via email to