Posted: 2009-08-11 20:36
I have a scanner that drops files into a folder throughout the day. I need to automatically upload these files to a server. I created this script to do that job, and a .bat file for my users to launch WinSCP.
But, how can I keep the connection alive, or reconnect every time a file is placed in the required folder?
# Automatically answer all prompts negatively not to stall
# the script on errors (off), set to 'contunue' to ignore all errors.
option batch off
# Attempt reconnect in 3 seconds if connection fails
option reconnecttime 3
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Open connection to server
# Synchronize directories so 'keepuptodate' won't cause problems.
synchronize both "C:\Documents and Settings\user\Desktop\FTP_folder"
# With the sync we can use 'uptodate' to keep the folders synced
keepuptodate -delete "C:\Documents and Settings\user\Desktop\FTP_folder"
Location: Prague, Czechia
You can post new topics in this forum
And it's free!