参考网上代码:
我用下面代码怎么取不出ftp上文件名列表? idftp1.List(listbox1.Items);
  for i := 0 to IdFTP1.ListResult.Count - 1 do
  begin
    FileName:=IdFTP1.DirectoryListing.Items[i].FileName;
    msgbox(FileName);  //测试用
  end;运行后:listbox1.Items可以得到文件列表,但运行到IdFTP1.DirectoryListing.Items就直接提示出错,出错信息如下:
No ftp list parsers have been registered.这是怎么回事?有错么?
IdFTP1.DirectoryListing.items一直都是空的,救命

解决方案 »

  1.   

    試試用遍歷FindFirst 
      
      var 
      searchRec:TsearchRec; 
         while   (FindNext(SearchRec)   =   0)   do 
                  begin 
                      if   IsValidDir(SearchRec)   then 
                      showmessage(SearchRec.Name); 
                    //      subdir1.Add(SearchRec.Name); 
                  end; 
      
      FindClose(SearchRec); 
     
      

  2.   

    很明显idftp控件的那个功能需要外挂解析器才行,默认情况不能使用那个属性
      

  3.   

    idftp 中,你说的那个外挂解析器属性是什么?   (NMFTP组件好像是用的是parselist)我链接网络的可以,链接本地的ftp站点就出现楼主这样的问题,麻烦请帮我解答一下。本人邮箱 [email protected]
      

  4.   

    uses IdAllFTPListParsers;http://borland.newsgroups.archived.at/public.delphi.internet.winsock/200610/0610249529.html