Yuppski 0 Posted October 19, 2023 Hi All I have a test app that uses the Indy components. I'm replicating this test app using the Internet Component Suite, TSslFtpClient. One of the features using the Indy components is to get a complete list of the Host Directories/Files:- procedure TfrmMain.GetFolderInventory; var DirList : TStringList; begin {$REGION 'Connected?'} if (myFTP.Connected) then begin try try lbConnection_Information.Caption := 'Going to root...'; myFTP.ChangeDir('/'); lbConnection_Information.Caption := 'At root, getting DirList...'; DirList := TStringList.Create; myFTP.List(DirList, '', True); lbConnection_Status.Caption := ''; lbConnection_Information.Caption := IntToStr(DirList.Count) + ' files and folders found'; mDirectories.Lines.Assign(DirList); except on e:Exception do begin lbConnection_Information.Caption := 'Unable to show contents'; lbConnection_Status.Caption := e.Message; end; end; finally FreeAndNil(DirList); end; end else lbConnection_Status.Caption := 'You are not connected...'; {$ENDREGION 'Connected?'} end; How can I replicate this using the TSslFtpClient? Also what do the options:- SslFtpClient1.Passive := True; SslFtpClient1.Binary := True; do? Thanks Share this post Link to post
Angus Robertson 577 Posted October 19, 2023 You are looking at a low level component where you'd need to code all that stuff yourself. Please use TIcsFtpMulti instead, which reads directories automatically and downloads or uploads multiple files with a single function call. The main sample is OverbyteIcsXferTst, but there also is a very simple sample in OverbyteIcsSnippets where you can press a button to download sample files. Angus Share this post Link to post