使用操作系统内置的 FTP 功能自动进行 FTP 上传

使用操作系统内置的 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%  ; 显示日志进行复查.

 

给TA捐赠
共{{data.count}}人
人已捐赠
其他

使用(延续片段)来文本提高可读性和可维护性

2018-1-3 9:00:59

其他

AHK1.1复制一个文件夹中所有文件和文件夹到另一个文件夹中

2018-1-3 9:05:14

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索