【发布时间】:2011-08-19 06:58:11
【问题描述】:
我编写自动 ftp 脚本。
并抛出错误:
The syntax of the command is incorrect.
User (domain.lt:(none)):
Error reading password.
Login incorrect.
Login failed.
代码:
@ECHO OFF
mkdir C:/dtmp
ECHO USER username > script.ftp
ECHO PASSWORD password > script.ftp
ECHO cd Directories-files > script.ftp
ECHO lcd C:/dtmp > script.ftp
ECHO binary > script.ftp
ECHO prompt n > script.ftp
ECHO get main.py > script.ftp
:: Use the temporary script for unattended FTP
:: Note: depending on your OS version you may have to add a '-n' switch
FTP -v -s:script.ftp domain.lt
:: For the paranoid: overwrite the temporary file before deleting it
TYPE NUL >script.ftp
DEL script.ftp
GOTO End
:End
【问题讨论】:
标签: ftp batch-file