Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 92476 invoked from network); 15 May 2002 13:11:36 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 15 May 2002 13:11:36 -0000 Received: (qmail 10005 invoked by uid 97); 15 May 2002 13:11:26 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 9971 invoked by uid 97); 15 May 2002 13:11:26 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 9946 invoked by uid 98); 15 May 2002 13:11:25 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Message-ID: <002201c1fc11$f70f6770$3a05000a@seagull.nl> From: "Glen Marchesani" To: Subject: deleting a file if it does or does not exist Date: Wed, 15 May 2002 15:08:04 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0019_01C1FC22.501278C0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------=_NextPart_000_0019_01C1FC22.501278C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 =20 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. =20 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 ------=_NextPart_000_0019_01C1FC22.501278C0--