现在的位置: 首页 > 综合 > 正文

IDFtp list问题,请大家帮忙

2012年06月22日 ⁄ 综合 ⁄ 共 887字 ⁄ 字号 评论关闭
IDFtp list问题,请大家帮忙 Delphi / Windows SDK/API
http://www.delphi2007.net/DelphiNetwork/html/delphi_20061128084519243.html
大家看一下,我用WINDOWS   FTP服务没有问题,而用Serv-U时,在LIST时,总报一个导常.将FTP设置成APassive也不行啊,高手帮忙.  
  function   TCompareFinance.GetDirList:   Boolean;  
  var   i:integer;  
          tempList:TStringS;  
  begin  
      result   :=   true;  
      tempList:=TStringList.Create;  
      try  
          try  
              DirList.Clear;  
              GetFTPInfo;       //得到FTP信息,如IP,PORT,USER等  
              if   not   ftp.Connected   then  
                  ftp.Connect(true,   5000);  
              ftp.Passive   :=   true;  
              ftp.List(tempList,'*.*',false);  
              for   i:=0   to   tempList.Count-1   do  
                  try  
                      ftp.ChangeDir(tempList.Strings[i]);  
                      ftp.ChangeDirUp;  
                      DirList.Add(tempList.Strings[i]);  
                  except  
                  end;  
          except  
              result:=false;  
          end;  
      finally  
          tempList.Free;  
          ftp.Disconnect;  
      end;  
  end;

我用Serv-U,好像List(*.*)没问题。

【上篇】
【下篇】

抱歉!评论已关闭.