在ftp上下载/上传多个文件的最佳方式 [英] Best way to download/upload multple files on ftp
问题描述
嗨伙计,
Hi dudes,
我的问题听起来。,下载/上传的最佳方式(最快方式)是什么ftp上的多个文件?我认为,
最大的问题是这一行 我的代码:
my question sounds., what is the best way (fastest way) to download/upload multiple files on ftp? I think, the biggest problem is this line of my code:
Stream requestStream = request.GetRequestStream();
我必须在下载/上传之前为每个文件使用此行–但这条线很多时间是
消费。分享的任何想法/链接/代码?谢谢你的时间。
I have to use this line for each file before download/upload – but this line is much time consuming. Any idea/link/code for share? Thanks for you time.
原理图,使用的代码为一个..文件:
Schematic, used code for one up.. file:
FtpWebRequest request =( FtpWebRequest ) WebRequest .Create(" ftp://www.xzy.com/" + fileName);
FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://www.xzy.com/" + fileName);
    
request.Method = WebRequestMethods 。 Ftp .UploadFile;
request.Method = WebRequestMethods.Ftp.UploadFile;
     
request.Credentials = new
NetworkCredential (" ftp2225" ,
" 7134005" );
request.Credentials = new NetworkCredential("ftp2225", "7134005");
        
request.KeepAlive = false ;
request.KeepAlive = false;
Stream requestStream = request.GetRequestStream();
Stream requestStream = request.GetRequestStream();
        
requestStream.Write(pomocna,0,pomocna.Length);
requestStream.Write(pomocna, 0, pomocna.Length);
推荐答案
您好Johny
Hi Johny
检查下面的FileUpload Manager示例
Check below FileUpload Manager Sample
http://uploadmanager.codeplex.com/
问候
Rozy
这篇关于在ftp上下载/上传多个文件的最佳方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!