[fpc-pascal] EFCreateError' Unable to create file

vmars 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, 
Lazarus-0.9.26-fpc-2.2.2-win32.exe,
wxPython2.8-win32-unicode-2.8.9.1-py26.exe , Boa 0.6.1
http://www.flickr.com/photos/vmars956/

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:
>
> ...
>  Try
>    Memo1.SaveToFile(ExecuteName);
>  Except
>    On E: Exception do
>    begin
>      ShowMessage('Exception occurred of '+E.ClassName+LineEnding+
>        'Attempted to save to:'+LineEnding+>'+ExecuteName+'<');
>    end;
>
> And you will see:
>
> Exception occurred of EFCreateError
> Attempted to save to:
>>"C:\lazarus\fpc\2.2.2\bin\i386-win32\Del2Pas\Del2Pas\Del2Pas.bat"<
>
> 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
> "bug".
>
> Bart
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> 




More information about the fpc-pascal mailing list