|Subject:||Re: FTP multiple spaces in file names being lost|
|Posted by:||Remy Lebeau (Indy Team) (firstname.lastname@example.org)|
|Date:||Wed, 28 Feb 2007|
"Andrew" <email@example.com> wrote in message
> I am using Delphi 7 with Indy 9. I am finding that multiple spaces
> in file names are being replaced by single spaces.
> If you try TidFTP.MakeDir('abc 123') you get abc 123 with one
> space in between instead of two.
Indy passes the specified name as-is to the server, so it is the
server itself that is changing it. The FTP specs allow the server to
modify the name to suit the particular file system being used. Also,
on some file systems, the path specified to ChangeDir() and MakeDir()
are not compatible with each other (this is documented in the FTP
spec). So there is no guarantee that the name you specify is the name
that the server will actually use. That is why the server's reply to
MakeDir() will include the actual name that was used, and that is the
name that you must specify when referring to the folder later on, such
as in ChangeDir().
FTP multiple spaces in file names being lost posted by Andrew on Wed, 28 Feb 2007