How to download Delphi from FTP servers with authentication?

I have some files on an FTP server in Hostinger, and these files were left there since FTP server links never change. Since they are very important for making updates in my application, Delphi should download them.

Author: LINQ, 2015-08-23

1 answers

You can do with the TIdFTP component. Ex.:

IdFTP1.Disconnect();

IdFTP1.Host := 'ftp.seuftp.com';
IdFTP1.Port := 21;
IdFTP1.Username := 'usuario';
IdFTP1.Password := 'senha';
IdFTP1.Passive := true;

IdFTP1.Connect(true, 10000);    

IdFTP1.Get (arquivoNoServidor, arquivoDestino, true, false);

Source

 1
Author: LINQ, 2015-08-27 11:02:59