我有一个批处理文件,其中包含以下行...
ftp < ftpcom.txt
ftpcom.txt 文件包含一些类似...
open ftp.mysite.com
myusername
mypassword
cd public_html
cd subdirectory
mput afile.txt
y
quit
这已经在我的 Windows 10 PC 上完美运行了一段时间,但我暂时被迫切换到旧的 Windows 7 PC,现在它被密码卡住了。即我看到它已连接到 ftp.mysite.com 并读取了我的用户名,现在要求输入密码(我看到文本“密码:”),但之后我什么也没看到。DOS 框卡住了 - 就好像它在等待某人输入密码一样。也许有一些 Windows 7 功能,即 ftp 拒绝接受来自文件的密码?
显然,这可能根本不是 Windows 7 与 10 的问题——也许只是一些不正确的配置设置。
从cmd.exe
如果你运行ftp /?
你得到一些帮助。让我们关注此帮助输出的一个特定部分。
-s:filename Specifies a text file containing FTP commands;
the commands will automatically run after FTP starts.
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句