ftp

谁知道关于的操作
尤其是怎么判断ftp上面有没有你像要的那个文件那?
要是有的话下载,怎么下载,要是没有的话提示!
谢谢了阿,我很着急
idftp1.get()
idftp1.put()
具体都怎么用阿?

解决方案 »

  1.   

    indyFtp.Host := HostIP;
      indyFtp.Port := HostPort;
      indyFtp.Username := FTP_USERNAME;
      indyFtp.Password := FTP_PASSWORD;  try
        indyFtp.Connect(True);
        if indyFtp.Connected then
        begin
          if not ChangeFtpDir(indyFtp, Copy(FileInfo.szDateTime, 1, 8)) then             
    begin
            indyFtp.Disconnect;
            indyFtp.Free;
            Exit;
          end;////////////////////////////////////////////////////////////////////////////////////
          //ÏÂÔØÎļþ
          try
            indyFtp.Get(FileName,FullPath,True);
            Result := True;
          except
            indyFtp.Disconnect;
            indyFtp.Free;
            Exit;
          end;
        end;
      Finally
        indyFtp.Disconnect;
        indyFtp.Free;
      end;