简体   繁体   English

批处理脚本连接到ftp服务器?

[英]Batch script connect to ftp sever?

I am trying to connect to my ftp server by running a batch script. 我试图通过运行批处理脚本连接到我的ftp服务器。 I can log into it fine by typing the following: 我可以通过输入以下内容登录:

ftp home.ptd.net
USERNAME
PASSWORD
cd Public
put FILENAME.txt
bye

But if I put this into a script in this order, it connects to the server, but still asks for a username. 但是,如果我按此顺序将其放入脚本中,它会连接到服务器,但仍会要求输入用户名。 Can anyone point me in the right direction on how to make it login? 任何人都可以指出我如何使其登录正确的方向? Thanks. 谢谢。

please see the following msdn article: ftp reference from msdn 请参阅以下msdn文章: 来自msdn的ftp参考

i think you need to place the commands in a text file and pass it to the ftp command with the -s parameter 我认为您需要将命令放在文本文件中,并使用-s参数将其传递给ftp命令

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM