<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16674" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I assume you've added the '\' character between
PathN and FileN.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Laurie..</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=colmin@ihug.co.nz href="mailto:colmin@ihug.co.nz">Colin/Mina</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=delphi@delphi.org.nz
href="mailto:delphi@delphi.org.nz">DUG, - Delphi</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Sunday, June 29, 2008 3:40 PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [DUG] Delete (File) Function
?</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> I'm having a problem deleting a database
file where PathN is a string containing the directory name eg: 'c:\Test' and
FileN is a string containing the file name </FONT></DIV>
<DIV><FONT face=Arial size=2> eg: 'New
Record.dbf''</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> Using -</FONT></DIV>
<DIV><FONT face=Arial size=2> <BR> if FileExists(PathN + File)
then<BR> begin<BR> ShowMessage('File
Exists');
// and it
does<BR></FONT><FONT face=Arial
size=2> if
DeleteFile(PathN + 'New Record.dbf')
then<BR>
ShowMessage('File
Deleted')
// and it does occasionally</FONT></DIV>
<DIV><FONT face=Arial
size=2>
else</FONT></DIV>
<DIV><FONT face=Arial
size=2> ShowMessage('File
Not
Deleted');
// and it does mostly</FONT></DIV>
<DIV><FONT face=Arial size=2> end;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> Note if I modify the code and use the
'Erase' procedure results are the same.</DIV>
<DIV><BR></DIV></FONT>
<DIV><FONT face=Arial size=2> Any clues as to why this oddity occurs?
</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks</DIV></FONT>
<P>
<HR>
<P></P>_______________________________________________<BR>NZ Borland
Developers Group - Delphi mailing list<BR>Post: delphi@delphi.org.nz<BR>Admin:
http://delphi.org.nz/mailman/listinfo/delphi<BR>Unsubscribe: send an email to
delphi-request@delphi.org.nz with Subject: unsubscribe
<P>
<HR>
<P></P><BR>No virus found in this incoming message.<BR>Checked by AVG.
<BR>Version: 8.0.101 / Virus Database: 270.4.2/1523 - Release Date: 6/28/2008
7:00 AM<BR></BLOCKQUOTE></BODY></HTML>