delphi2007 教程

delphi2007 教程

首页 新随笔 联系 聚合 管理
  1013 Posts :: 0 Stories :: 28 Comments :: 0 Trackbacks
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(*.*)没问题。

posted on 2009-03-02 11:32 delphi2007 阅读(476) 评论(0)  编辑 收藏 引用
只有注册用户登录后才能发表评论。