How to download from Delphi via FTP servers with authentication?

Asked

Viewed 854 times

4

I have some files on an FTP server at Hostinger, and these files were left there as links from FTP servers never change. As they are very important to make updates in my application, Delphi should download them.

  • Which version of Delphi you’re using?

1 answer

1

You can do it with the component Tidftp. 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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.