使用操作系统内置的 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% ; 显示日志进行复查.
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

