使用操作系统内置的 FTP 功能自动进行 FTP 上传
; 下面的例子演示了如何使用操作系统内置的 FTP 功能 ; 自动进行 FTP 上传. 此脚本已经在 Windows XP 中测试通过. FTPCommandFile = %A_ScriptDir%\FTPCommands.txt FTPLogFile = %A_ScriptDir%\FTPLog.txt FileDelete %FTPCommandFile% ; 避免之前运行意外中止带来的问题. FileAppend, ; 这里需要逗号. ( open host.domain.com username password binary cd htdocs put %VarContainingNameOfTargetFile% delete SomeOtherFile.htm rename OldFileName.htm NewFileName.htm ls -l quit ), %FTPCommandFile% RunWait %comspec% /c ftp.exe -s:"%FTPCommandFile%" >"%FTPLogFile%" FileDelete %FTPCommandFile% ; 删除以避免安全问题. Run %FTPLogFile% ; 显示日志进行复查.