THX for Your reply. The problem is that I tried everything. I used Your
FTPTest Sample (Ftptst.dpr). I used Binary and without Binary. Also Sync and
Async. Same

The File is a RAR-Archive-Part. So it is no text. I tested over 3 hours.
The filesize is 15000000 Bytes using the filesize-command.

This is the way I tested the binary-mode:

Enter the values to get access to the server into the Edits.
Marked 'Binary'. Clicked on connect. Clicked on cwd and then on get.
FTPClient starts downloading the file. Filesize was 15054856 bytes on my

I did the same without checking binary. Same result. Can you post me the
commands for Delphi7 You would connect to a Unix-Server and start
downloading a file.

Here my way I did:

    FtpClient1.HostName           := HostNameEdit.Text;
    FtpClient1.Port               := PortEdit.Text;
    FtpClient1.UserName           := UserNameEdit.Text;
    FtpClient1.Password           := PasswordEdit.Text;
    FtpClient1.HostDirName        := HostDirEdit.Text;
    FtpClient1.HostFileName       := HostFileEdit.Text;
    FtpClient1.LocalFileName      := LocalFileEdit.Text;
    FtpClient1.Passive            := passivecheck.checked;
    FtpClient1.Binary             := true; 
   {FtpClient1.Binary             := binary.checked;}

> If I download a file on a NT-Server all is OK. Downloaded filesize is the
> same as on the server. On the Unix-Server I got problems.
> FTPClient say me via filesize that the file has 15000000 Bytes.
> If I use the FTPClient I got 15054856 bytes on my HDD.

This is usually caused by a wrong transfert type selection. Be sure to use
Binary mode if you want
to have the exact same file. Default is text mode.

On a Unix system, a text file has lines delimted by a single LF character.
On Windows, a text file
has lines delimited by CR/LF pairs. FTP protocol has a mechanism to tranfer
binary or text files.
When transfering text files, FTP does the conversion needed. That is a Unix
text file transfered to
a Windows server becomes larger since LF are translated to CR/LF.

Now speaking programming, you need to set the Binary property to TRUE or
FALSE and call the method
TypeSet to send the type you want to the server (translation is done by the
server), before you do
the actual transfert. By default, FTP protocol specifies a text transfert
(Binary is FALSE).

Handyrechnung zu hoch? Tipp: SMS und MMS mit GMX
Seien Sie so frei: Alle Infos unter

Handyrechnung zu hoch? Tipp: SMS und MMS mit GMX
Seien Sie so frei: Alle Infos unter

To unsubscribe or change your settings for TWSocket mailing list
please goto
Visit our website at

Reply via email to