从Windows应用程序中的服务器下载文件夹 [英] Download folder from server in Windows Application

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

问题描述

我有一个Windows应用程序和C#作为PL.我想从包含子文件夹和文件的服务器上下载文件夹.没有ftp服务器.是否可以?至少通过是/否回答.

I am having a Windows Application and C# as PL.I want to download folder from server consisting of sub-folders and files.There is no ftp server.Is it possible?At least reply by yes/no.

推荐答案

当然可以.只要您的应用程序在可访问服务器上共享文件夹的凭据下运行,您就可以执行这些操作.使用System.IO命名空间遍历文件和文件夹,并将它们复制到您在应用程序中定义的目标位置.
Of course it is possible. As long as your application runs under credentials with access to the shared folder on the server, you can perform these actions. Use the System.IO namespace to iterate over the files and folders and copy them to some destination that you define in your application.


这篇关于从Windows应用程序中的服务器下载文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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