Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Jul : [ICS 6 + FTP] Why does server accept two files with same filename?
| Subject: | [ICS 6 + FTP] Why does server accept two files with same filename? |
| Posted by: | "Gilles Ganault" (nospam@nospam.com) |
| Date: | Thu, 26 Jul 2007 01:46:18 |
Hello
I used ICS 6 to update a file on a web server through its FTP
server, and noticed that if I just upload the file without deleting
the existing copy beforehand, the server happily keeps two copies of
the same file!
==========
FtpClient1.UserName:='mylogin';
FtpClient1.PassWord:='mypasst';
FtpClient1.HostName:='ftp.acme.com';
FtpClient1.Passive := True;
FtpClient1.LocalFileName:='.\myfile.txt';
FtpClient1.HostDirName:='/';
FtpClient1.HostFileName := FtpClient1.LocalFileName;
try
FtpClient1.Connect;
FTPClient1.Binary := True;
FtpClient1.Put;
FtpClient1.Quit;
except
Memo1.Lines.Add('Error uploading to FTP. Disconnecting.');
Button1.Enabled := True;
Button1.Caption := OrigText;
end;
Memo1.Lines.Add('FTP Done');
==========
How can a (Unix) FTP server host more than one copy of the exact same
filename in the same directory?
Thank you?