[不是问题]从ftp服务器下载文件到本地磁盘的代码 [英] [Not a question] Code to download files from ftp server to local disk

查看:102
本文介绍了[不是问题]从ftp服务器下载文件到本地磁盘的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我想从ftp服务器下载文件并下载到我的本地disk.i搜索互联网但没有找到它的代码。我是新的到vb.net和ssis。我必须使用脚本任务执行此操作。

请帮助我,我搜索任何东西,但它没有用。我想从folder.i下载.txt文件的文件asap

提前感谢

解决方案

您可以使用类 System.Net.FtpWebRequest :< a href =http://msdn.microsoft.com/en-us/library/system.net.ftpwebrequest%28v=vs.110%29.aspx> http://msdn.microsoft.com/en-us /library/system.net.ftpwebrequest%28v=vs.110%29.aspx [ ^ ]。



你也可以使用class System.Net.WebClient ,它提供简化的功能,所需的协议由URI决定:

http://msdn.microsoft.com/en-us/library/system.net .webclient%28V = vs.110%29.aspx [< a href =http://msdn.microsoft.com/en-us/library/system.net.webclient%28v=vs.110%29.aspxtarget =_ blanktitle =New Window> ^ ],

http:/ /msdn.microsoft.com/en-us/library/ez801hhe%28v=vs.110%29.aspx [ ^ ]。



最后一个链接显示MSDN页面,其中包含几行示例代码。这就是你所需要的,只使用你的FTP URI。



-SA


如何从FTP服务器下载文件 [ ^ ]。


最后我找到了很棒的文章,请关注并开始开始



https://www.eldos.com/sbb/sftp.net /sftp-net-vb-sample.php



谢谢



享受!!!! 1

Hi all
I want to download files from ftp server and download to my local disk.i searched internet but didn't find code for it.i am new to vb.net and ssis. i have to do this using script task.
please help me i searched like anything but its of no use.i want to download files with .txt files from folder.i have do it asap
thank in advance

解决方案

You can use the class System.Net.FtpWebRequest: http://msdn.microsoft.com/en-us/library/system.net.ftpwebrequest%28v=vs.110%29.aspx[^].

You can also use the class System.Net.WebClient, which provides simplified functionality, and the required protocol is determined by the URI:
http://msdn.microsoft.com/en-us/library/system.net.webclient%28v=vs.110%29.aspx[^],
http://msdn.microsoft.com/en-us/library/ez801hhe%28v=vs.110%29.aspx[^].

The last of the links shows the MSDN page with few lines of sample code. This is all you need, only use you FTP URIs.

—SA


Refer- How to download files from FTP server[^].


finally i found the great article for you please follow and start the begining

https://www.eldos.com/sbb/sftp.net/sftp-net-vb-sample.php

thank you

enjoy!!!!1


这篇关于[不是问题]从ftp服务器下载文件到本地磁盘的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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