Newsgroups : Borland : borland.public.delphi.rtl.win32 : 2005 Dec : CopyFile asynchronous? Or at least lock a the file?
| Subject: | CopyFile asynchronous? Or at least lock a the file? |
| Posted by: | "Ian Boyd" (ian.borlandnews0..@avatopia.com) |
| Date: | Thu, 1 Dec 2005 10:09:45 |
Consisder the code snippet:
if not CopyFile(PChar(PDFFilename), PChar(LocalFilename), False) then
raise Exception.Create('Error copying quote PDF to temporary folder:
'+Localfilename+CRLF+
'From server location: '+PDFFilename);
if not FileExists(LocalFilename) then
raise Exception.Create('Error copying quote PDF to temporary folder:
'+LocalFilename);
i am getting the 2nd exception. CopyFile suceeded, but FileExists insists
teh file isnt' there.
What's the best way to work around this?