如何使用C#从命令提示符自动执行ftp登录? [英] How can one automate the ftp login from command prompt using C#?

查看:175
本文介绍了如何使用C#从命令提示符自动执行ftp登录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想访问一个远程位置并从该位置下载一些文件。重点是访问需要凭证作为命令行的输入。我想用C#自动完成整个事情。

任何人都可以帮我实现同样的目标,即。如何自动登录远程机器。

谢谢!!!

解决方案

尝试使用FtpWebRequest,检查如何:使用FTP下载文件 [ ^ ]

如何使用C#将多个文件从FTP服务器传输到本地目录? [ ^ ]

或者您可以尝试使用免费FTP图书馆 [ ^ ]

Hi,
I want to access a remote location and download some files from the location. The point is the accessing requires credentials to be given as input to the command line. And i want to automate the entire thing using C#.
can anyone please help me in achieving the same,ie. how can i automate the logging into the remote machine .
Thanks!!!

解决方案

try with FtpWebRequest , check How to: Download Files with FTP[^]
How to transfer multiple files from FTP server to local directory using C#?[^]
Or you can try one of Free FTP Library[^]


这篇关于如何使用C#从命令提示符自动执行ftp登录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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