用于监视 FTP 服务器上的更改的批处理脚本 [英] Batch script to watch for changes on FTP server

查看:33
本文介绍了用于监视 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 脚本 及其 synchronize 命令:

You can use WinSCP scripting with its synchronize command:

:Loop
winscp.com /command ^
    "option batch abort" ^
    "open <session>" ^
    "synchronize local <local directory> <remote directory>" ^
    "exit"
timeout 10
goto :Loop


在 Windows XP 和更早版本上,使用 ping -n 10 127.0.0.1 而不是 timeout 10.


On Windows XP and older, use ping -n 10 127.0.0.1 instead of timeout 10.

另见:

这篇关于用于监视 FTP 服务器上的更改的批处理脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆