[DUG] Delete (File) Function ?
John@padasy
john at padasy.co.nz
Sun Jun 29 16:54:00 NZST 2008
Are you sure the file is not in use?
John
From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz] On
Behalf Of Colin/Mina
Sent: Sunday, 29 June 2008 3:40 p.m.
To: DUG, - Delphi
Subject: [DUG] Delete (File) Function ?
Hi,
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
eg: 'New Record.dbf''
Using -
if FileExists(PathN + File) then
begin
ShowMessage('File Exists'); //
and it does
if DeleteFile(PathN + 'New Record.dbf') then
ShowMessage('File Deleted') //
and it does occasionally
else
ShowMessage('File Not Deleted'); // and
it does mostly
end;
Note if I modify the code and use the 'Erase' procedure results are the
same.
Any clues as to why this oddity occurs?
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20080629/2cc316e6/attachment.html
More information about the Delphi
mailing list