Batch script to watch for changes on FTP server
问题 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. Any ideas? I use WinSCP. 回答1: 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 On Windows XP and older, use ping -n 10 127.0.0.1 instead of timeout 10 . 回答2: Use the /synchronize