ftp上传和下载进度 [英] ftp upload and download with progress

查看:79
本文介绍了ftp上传和下载进度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将文件上传并下载到具有进度的ftp服务器.我已经阅读了多篇文章和示例代码,但无法完成此任务.

I am trying to upload and download a file to a ftp server with progress. I have already went through multiple articles and sample code but was not able to complete this task.

推荐答案

我的命名空间具有名为的内置参数. >"showUI" :

My.Computer.Network.DownloadFile

要下载文件并显示进度,只需调用:

To download a file and display progress, simply call:

My.Computer.Network.DownloadFile _
("ftp://example.com/file.txt"、c:\myfile.txt",", ,1000,真)

My.Computer.Network.DownloadFile _
("ftp://example.com/file.txt", "c:\myfile.txt", "", "", True , 1000, True)

要上传文件并显示进度,只需调用:

To upload a file and display progress, simply call:

My.Computer.Network.UploadFile

My.Computer.Network.UploadFile _
("c:\ myfile.txt","ftp://example.com/file.txt",", ,1000)

My.Computer.Network.UploadFile _
("c:\myfile.txt", "ftp://example.com/file.txt", "", "", True , 1000)

请注意,"True"表示粗体表示您应该看到进度对话框.其他参数是链接上记录的用户名,密码,超时等.

Note that "True" in bold specifies that you should see progress dialog. The other paramaters are username,password,timeout etc. documented on the links.

HTH.


这篇关于ftp上传和下载进度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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