【发布时间】:2014-07-16 03:23:00
【问题描述】:
如果已连接互联网,我想将文件上传到我的 ftp 服务器
在每次运行中,我更喜欢:
if (ftp server can be connected){
upload the file "C:\abc.txt" to the ftp server directory "/ABC_DB"
}
因此,我不知道如何检查 ftp 连接,是否可以这样运行:
echo abc > C:\abc.txt
???Check the connection here
OPEN your.ftp.server.com
usernameabc
passwordbcd
CD /ABC_DB
PUT "C:\abc.txt"
QUIT
PAUSE
不好意思问了这么傻的问题,不过我是新手,希望你能帮帮我=[
【问题讨论】:
-
ping your.ftp.server.com -
是的。因为我每天可能会运行两次脚本,如果它可以连接到 ftp 服务器,我更喜欢将文件上传到 ftp 服务器,否则它会在日志中显示错误消息
标签: windows batch-file ftp