Topic "Keep Connection Alive"

Author Message
radix

Guest


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?

Script:
Code:

# 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
open ftp://[server].com:[port#]

# 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"
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
You can configure keepaliaves in GUI only. Though this FAQ may help you.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License