在Delphi中利用FTP实现文件的上传和下载,有这方面例子吗

解决方案 »

  1.   

    Delphi自己的Demo中就有FTP的例子,你可以自己找一找。
      

  2.   

    c:\program........\delphi5\demos\fastnet
      

  3.   

    delphi5和delphi6都有ftp的例子。
    \demos\fastnet
    \demos\indy建议用indy或者ics的ftp控件。
    fastnet的ftp控件有bug!
      

  4.   

    program DataExch;{$APPTYPE CONSOLE}uses
      SysUtils,
      Idftp;var
      idftp1:Tidftp;
      string1,string2:string;
    begin
      { TODO -oUser -cConsole Main : Insert code here }
      string1:='H:\电脑数据\发送数据\gmware.dbf';
      string2:='H:\电脑数据\接收文件\stock.dbf';
      idftp1:=Tidftp.Create(nil);
      idftp1.Host:='ftp.server.com.cn';
      idftp1.User:='anonymous';
      idftp1.Password:='';
      idftp1.Connect(true);
      if fileexists(string1) then
        idftp1.Put(string1,'gmware.dbf');
      if fileexists(string2) then
        deletefile(string2);
      idftp1.Get('stock.dbf',string2);
      idftp1.Disconnect;
    end.
      

  5.   

    直连的Ftp很容易办到,有谁能解决代理服务器的功能呢?