从远程服务器复制zip文件 [英] Copy zip file from remote server

查看:73
本文介绍了从远程服务器复制zip文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我想用c#dot net 3.5将zip文件从远程服务器复制到控制台应用程序中的本地机器。



如果有人有代码,请与我分享。



提前感谢...

Hi,

I want to copy zip file from remote server to local machine in console application with c# dot net 3.5.

If any one have code for it please share with me .

Thank in advance...

推荐答案

这是一种方式......来自:
http: //www.csharp-examples.net/download-files/



Here's one way...from:
http://www.csharp-examples.net/download-files/

using System.Net;

WebClient webClient = new WebClient();
webClient.DownloadFile("http://mysite.com/myfile.zip", @"c:\myfile.zip");





查看引用的网页以获取更多信息。



Have a look at the referenced web page for more info.


这篇关于从远程服务器复制zip文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆