如何使用批处理文件FTP? [英] How to ftp with a batch file?
本文介绍了如何使用批处理文件FTP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想一个批处理文件到FTP到服务器,读出一个文本文件,并断开连接。服务器需要用户名和密码。我试过
I want a batch file to ftp to a server, read out a text file, and disconnect. The server requires a user and password. I tried
@echo off
pause
@ftp example.com
username
password
pause
但它从来没有登录。我怎样才能得到这个工作?
but it never logged on. How can I get this to work?
推荐答案
The answer by 0x90h helped a lot...
我保存这个文件u.ftp:
I saved this file as u.ftp:
open 10.155.8.215
user
password
lcd /D "G:\Subfolder\"
cd folder/
binary
mget file.csv
disconnect
quit
我然后跑这个命令:
I then ran this command:
ftp -i -s:u.ftp
和它的工作!
感谢很多人:)
这篇关于如何使用批处理文件FTP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文