Forum > Packages and Libraries
indy10 ftpclient list folder show empty list
eldonfsr:
Hello its possible on ftpclient on root folder get list of folders at ftp server...
i have this code but always show empty list
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TFomMain.FormShow(Sender: TObject);var i,ld:integer; Tr:tstrings; fi:string; Tt:tidftplistitems; T:tidftplistitem;begin FPXMLBFtp.LoadFromFile('FTPSetting.xml'); TR:= Tstringlist.create; idFTP1.Host:= FPXMLBFTP.GetAttrValueByName('Server.ip', 'value'); idFTP1.Passive:=true; idFTP1.Username:=FPXMLBFTP.GetAttrValueByName('Server.user', 'value'); idFTP1.Password:=FPXMLBFTP.GetAttrValueByName('Server.password', 'value'); idFTP1.Port:=strtoint(FPXMLBFTP.GetAttrValueByName('Server.port', 'value')); Statusbar1.Panels[0].Text:='No Conncted , wait'; idFTP1.Connect; if(idFTP1.Connected = true) then begin Statusbar1.Panels[0].Text:='Conncted to '+ idFTP1.Host; idFTP1.ChangeDir('..'); idFTP1.List('*',true); Memo1.Lines.Add(idFTP1.RetrieveCurrentDir); for i:=0 to Idftp1.directorylisting.Count-1 do begin if((IdFTP1.DirectoryListing[I].ItemType = ditDirectory) and (IdFTP1.DirectoryListing[I].FileName <> '.') and (IdFTP1.DirectoryListing[I].FileName <> '..')) then begin Memo1.Lines.Add(IdFTP1.DirectoryListing[I].FileName); end else if( IdFTP1.DirectoryListing[I].ItemType = ditFile) then begin Memo1.Lines.Add(IdFTP1.DirectoryListing[I].FileName); end; end; end;
eldonfsr:
What i need to do of this error
rvk:
Add IdAllFTPListParsers to the uses clause.
Or you can add IdFTPListParseUnix or IdFTPListParseWindowsNT individually.
eldonfsr:
Send me error can't find IdFTPListParseUnix , could be a problem because i install indy from package on line could better download and install package...
Thanks For help
Remy Lebeau:
--- Quote from: eldonfsr on January 08, 2022, 11:01:04 pm ---Send me error can't find IdFTPListParseUnix , could be a problem because i install indy from package on line
--- End quote ---
IdFTPListParseUnix.pas is located in the same folder as IdFTP.pas. If you are installing indylaz.lpk manually, you will probably have to update it to include that .pas file, as it includes only a handful of files needed to register the main Indy components, but not secondary classes, like the FTP list parsers, I think.
--- Quote from: eldonfsr on January 08, 2022, 11:01:04 pm ---could better download and install package...
--- End quote ---
Are you not installing Indy via OPM?
Navigation
[0] Message Index
[#] Next page