Page 1 of 1

tscftpclient ftps delphi example

Posted: Mon 20 Apr 2020 15:56
by fvancrae
Is there an example on how to write an FTPS client?

The documentation points to tscftpclient and I have an overview of the methods and properties but the correct call sequence is unclear.

Specifically : What should be called first: Connect or Login?

When I call Connect first it says 'FTP server error occured: not logged in'
When I call Login first an exception is thrown 'FTP client not connected'


FFTPSClient.HostName:=host;
FFTPSClient.port := port;
FFTPSClient.TLSMode:=tmAllowExplicitTLS;
FFTPSClient.Username := user;
FFTPSClient.AuthCommand := acAuto;
FFTPSClient.Password := pwd;
FFTPSClient.UsePassive:=(not (ftpoptNotPassive in ftpoptions));

FFTPSClient.Connect();
FFTPSClient.Login();

Re: tscftpclient ftps delphi example

Posted: Tue 21 Apr 2020 11:07
by ViktorV
The method TScFTPClient.Connect should be invoked before the method TScFTPClient.Login.
Please grant us access to your FTP server for testing purposes so that we could give you a detailed answer.