[fpc-pascal] EFCreateError' Unable to create file
vmars at rgv.rr.com
Mon Jan 26 18:57:20 CET 2009
Double quotes are ok in windows.
Check your system for any ShortCut aimed at "c:\Program Files".
And you'll see double quotes.
But your right about me having too many ""s.
I fixed that, and all is well.
Thanks All !
V e r n
WinXp sp2 , Delphi5, WebDwarf, Trellian WebPage,
wxPython2.8-win32-unicode-126.96.36.199-py26.exe , Boa 0.6.1
Wanted: Dwarf Hibiscus (Orange/Rasberry)
----- Original Message -----
From: "Bart" <bartjunk64 at gmail.com>
To: "FPC-Pascal users discussions" <fpc-pascal at lists.freepascal.org>
Sent: Sunday, January 25, 2009 5:36 AM
Subject: Re: [fpc-pascal] EFCreateError' Unable to create file
>> > Try
>> > Memo1.Lines.SaveToFile(ExecuteName);
>> > Except ShowMessage('Shoots, couldnt SaveToFile!');
>> > end;
>> > [Project raised exception class 'EFCreateError' with message:
>> > Unable to create file
>> > ""C:lazarusfpc2.2.2bini386-win32Del2PasDel2PasDel2Pas.bat""]
> You cannot create filenames that have double quotes (") in them on
> Windows (your ExecuteName has double quotes in it as you stated
> yourself), so the EFCreateError is correct.
> See for yourself:
> On E: Exception do
> ShowMessage('Exception occurred of '+E.ClassName+LineEnding+
> 'Attempted to save to:'+LineEnding+>'+ExecuteName+'<');
> And you will see:
> Exception occurred of EFCreateError
> Attempted to save to:
> And you will see the double quotes in the filename...
> I tested your code in Lazarus and in Delphi and both raise the error
> with the filename you supplied to SaveTofile (that is with all
> backslashes intact), so I cannot reproduce the second part of your
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
More information about the fpc-pascal