批处理脚本来监视FTP服务器上进行更改 [英] Batch script to watch for changes on FTP server
本文介绍了批处理脚本来监视FTP服务器上进行更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想打一个批处理脚本能够听我的FTP服务器和文件下载到我的电脑每一个新的文件在FTP服务器上载的时间。
I want to make a batch script able to listen to my ftp server and download files to my computer every time a new file is uploaded on the ftp server.
任何想法?我用的WinSCP。
Any ideas? I use WinSCP.
推荐答案
使用 WinSCP赋予脚本 < A HREF =http://winscp.net/eng/docs/scriptcommand_synchronize相对=nofollow> 同步
命令:
Use WinSCP scripting synchronize
command:
:Loop
winscp.com /command ^
"option batch abort" ^
"open <session>" ^
"synchronize local <local directory> <remote directory>" ^
"exit"
timeout 10
goto :Loop
有关详细信息,请参阅 http://winscp.net/eng/docs/scriptcommand_synchronize
For details see http://winscp.net/eng/docs/scriptcommand_synchronize
的在Windows XP及以上,使用平-n 10 127.0.0.1
而不是 10超时
的
On Windows XP and older, use ping -n 10 127.0.0.1
instead of timeout 10
.
这篇关于批处理脚本来监视FTP服务器上进行更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文