如何在C#中将包含文件的文件夹从远程位置复制到自己的计算机? [英] How can one copy a folder containing files from a remote location to one's own computer in C# ?

查看:331
本文介绍了如何在C#中将包含文件的文件夹从远程位置复制到自己的计算机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如何将文件夹从已知用户名和密码的远程位置复制到自己的PC上?

解决方案

1.如果您的文件夹位于本地网络(LAN)中,则该文件夹以您从计算机访问该文件夹的方式在LAN中共享,您可以使用相对URL访问该文件夹计算机文件夹如:\\RemoteFolder \\SomeFile.txt。



在此处查看有关如何复制整个文件夹的详细信息:MSDN链接 [ ^ ]



2.如果文件夹是在互联网上,或者在你的局域网中并且文件夹没有为你的用户共享,你根本无法访问它,你应该使用远程计算机上安装的本地服务来访问该文件夹为了复制它s content。


以编程方式复制文件 [ ^

Hi,
How can i copy a folder from a remote location, for which the username and password are known, to one's own PC ?

解决方案

1.If your folder is in your local network (LAN), the folder is shared in the LAN in the way that you have access from your computer to it, you could access it by using relative URL to the remote computer folder like: "\\RemoteFolder\\SomeFile.txt".

See details here about how to copy the entire folder:
MSDN Link[^]

2.If the folder is over the internet, or is in your LAN and the folder is not shared for your user, you cannot access it at all and you should use a local service installed on remote computer that have access to that folder in order to copy its content.


copying files progrmatically[^]


这篇关于如何在C#中将包含文件的文件夹从远程位置复制到自己的计算机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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