使用 Windows ftp 获取帮助文本而不是 运行 脚本

Getting help text instead of running script with Windows ftp

我正在使用 windows 8.1 并从 cmd 控制台使用 ftp(运行 作为管理员)。

如果我输入:

ftp -v -i -A thispc

注意: "thispc"在hosts文件中映射到我的本地ip地址

如果我再输入:

mput *.*

我当前文件夹中的所有文件都被推送到我的 ftp 服务器。

但是,如果我尝试从 .bat 文件执行此操作,它不起作用。

.bat 文件:

@echo off
ftp -v -i -A thispc -s:send_file.txt

send_file.txt的内容:

mput *.*
quit

我通过此 .bat 文件 运行 获得了 ftp 帮助文本,并附有以下注释:

mget and mput commands take y/n/q for yes/no/quit

ftp 调用中的 -i 应该禁用它。

有谁知道我如何让它工作。

尝试

prompt
mput *.*
quit 

在你输入的文件中。

好的 - 明白了。

很简单:

ftp -v -i -A -s:send_file.bat thispc

而不是:

ftp -v -i -A thispc -s:send_file.txt

来自 ftp 的错误消息不是很有用:-)