是这样的,一个项目中要把服务器端的一个目录下所有文件的内容(所有文件)下载到本地的一个目录中!服务器名称为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
因为时间的关系,我无法过多的考虑,希望大家提供原码(不是很难,功能实现即可)。最好使用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
解决方案 »
- 江湖告急---关于DELPHI使用SQLConnection查询MYSQL的问题
- 关于delphi中的sender
- 散分100,现在在珠三角,想去苏州找工作,大家给点意见,来者有分!!!
- 请问有没有办法判断鼠标没有移动?
- 请问出现:Illegal character in input file:($A1A1)属于什么错误?
- 一个三层数据库,换了服务器运行就提示“加载类型库/DLL失败”
- 求职,最好在重庆地区,谢谢!
- 用TDBGridEh表格控件时,怎样得到单元格的坐标?
- 如何在TMemo,TRichEdit选中一行?
- S。O。S紧急救援!!谁知道怎么恢复硬盘下被快速格式化的数据 问题解决,分数全送。1000
- 请教delphi7.0中的TcpServer的onAccept事件的用法,多谢指点!分数不够再加!
- 莫名其妙的错误?
作者: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;
原贴内容:
----------------------------------------------------------------
原贴内容:
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)
=================================================
邮件已发,去收吧
===================
什么意思???楼主??
发送 : 2004年4月28日 14:16:17
收件人 : [email protected]
主题 : CSDN__hnhb(不死鸟)来信。IndyFTP
| | | 收件箱
你好!永保青春才看到你在CSDN给我发了短信。回复如下:
用Indy下载数据假设你放了个IndyFTP控件到FORM中,并给这个IndyFTP取名为myFTP