[fpc-pascal] EFCreateError' Unable to create file

Bart bartjunk64 at gmail.com
Mon Jan 26 19:58:24 CET 2009


On 1/26/09, vmars <vmars at rgv.rr.com> wrote:
> Double quotes are ok in windows.
>  Check your system for any ShortCut aimed at "c:\Program Files".
>  And you'll see double quotes.

I know, but that is not what I meant by saying that double quotes are
not allowed in the filename. By that I meant they are not allowed as
part of the filename itself.
The double quotes around the filename are put there and interpreted by
the shell (OS).

If you ask the OS directly for the filename, there will be no double
quotes in it.
Check for yourself

In a DOS box do
C:>copy con "1 2 3.txt"
test file with spaces in its name
^Z (that is press Ctrl+Z) and press Enter.

Now you create a file with spaces in its name.
The shell (cmd.exe in W2K or higher) handles the double quotes.
(It actually needs these to know if a space is part of the filename,
or it means that the next part of the command is a new parameter)

Now write a program and  with FindFirst retrieve the filname and see:
the double quotes are not there.

Bart



More information about the fpc-pascal mailing list