是这样的,一个项目中要把服务器端的一个目录下所有文件的内容(所有文件)下载到本地的一个目录中!服务器名称为SERVER,所对应的目录是E:/Work下面,客户端为stu1,所对应的是D:/work.
  因为时间的关系,我无法过多的考虑,希望大家提供原码(不是很难,功能实现即可)。最好使用Indy控件!!请不要提示我看例子**处!代码知晓后调试通过既给分!根据难度和考虑的复杂度(如考虑到当登陆服务器要输入用户名和密码之类的什么)给分,最少100分先给10分然后再加若不信请见:
http://expert.csdn.net/Expert/topic/2911/2911356.xml?temp=.9797785
http://expert.csdn.net/Expert/topic/2633/2633726.xml?temp=.3162042

解决方案 »

  1.   

    使用ftp控件下载目录
    作者:atondelphi中的nmftp控件中Download函数只能下载一个文件,没有提供一个下载整个目录(包含子目录)的函数。我编写了个实现目录下载功能的方法,需要用到该功能的用户可参考一下。file://目录下载function tftp.ex_download(remote_dir,local_dir:string):boolean;var  i,j,count1:integer;  att,ss:string;  current_dir:string;  temp_dir:string;begin  try begin  NMFTP1.ChangeDir(remote_dir);  current_dir:=remote_dir;  temp_dir:=copy(current_dir,2,length(current_dir));  if not DirectoryExists(local_dir) then CreateDir(local_dir);  if not directoryexists(local_dir+temp_dir) then createdir(local_dir+temp_dir);  nmftp1.ParseList:=true;  NMftp1.list;  count1:=nmftp1.FTPDirectoryList.name.Count;  for i:=0 to count1-1 do begin  file://必须  NMFTP1.ChangeDir(current_dir);  nmftp1.list;  ss:=nmftp1.FTPDirectoryList.name.Strings[i];  att:=nmftp1.FTPDirectoryList.Attribute.Strings[i];  if (copy(pchar(att),1,1)<>'d')and(copy(pchar(att),1,1)<>'D') then begin  if not DirectoryExists(local_dir) then CreateDir(local_dir);  NMFTP1.Download(current_dir+ss,local_dir+temp_dir+ss);  end  else begin  if not directoryexists(local_dir+temp_dir+ss) then createdir(local_dir+temp_dir+ss);  file://递归调用  ex_download(remote_dir+ss+'\',local_dir);  end;  end;  result:=true;  end  except  On E:Exception do begin  result:=false;  end;  end;end;
      

  2.   

    ----------------------------------------------------------------
    原贴内容:
    ----------------------------------------------------------------
    原贴内容:
    http://expert.csdn.net/Expert/topic/2769/2769771.xml?temp=.3029444
    的问题你提供了开发的思路现在有相同的问题,你若解决代码问题,一百分相赠!!
    http://expert.csdn.net/Expert/topic/2981/2981491.xml?temp=.4101374代码调试通过100分!邮箱地址 [email protected](文件小于2M)
    =================================================
    邮件已发,去收吧
    ===================
    什么意思???楼主??
      

  3.   

    发件人 :  hnhb <[email protected]
    发送 :  2004年4月28日 14:16:17 
    收件人 :  [email protected] 
    主题 :  CSDN__hnhb(不死鸟)来信。IndyFTP 
      
      |  |  | 收件箱  
     
     
    你好!永保青春才看到你在CSDN给我发了短信。回复如下:
    用Indy下载数据假设你放了个IndyFTP控件到FORM中,并给这个IndyFTP取名为myFTP
     
     
      

  4.   

    我也正在学习FTP,收集了部分资料,需要就与我联系!MSN:[email protected]