Automatically reconnect in console mode?

Advertisement

janosh
Joined:
Posts:
2
Location:
Germany

Automatically reconnect in console mode?

I'm using WinSCP 5.1.4

I am using the "keep update" feature to sync a local folder with my remote folder over SFTP.

Command Line: "C:\...\winscp514\WinSCP.exe" /console /script="myscript.txt"

myscript:
open mysession
option reconnecttime 120
keepuptodate "D:\Hosted\private" "/home/host1/private" -delete -filemask="*.php"

If the connection temporarily crashes, it says "Network error: Software causes connection abort / Session 'mysession' closed / No session."

Is there a way to config, so WinSCP tries to re-connect automatically :?:

Thanks for your help
rgds,
janosh

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: Automatically reconnect in console mode?

No, this is not supported. Though you can loop the whole script in a .bat file (make sure you use winscp.com, not .exe).

Reply with quote

janosh

thanks for your answer. what is the effect of using the .com i/o .exe file? in case there is no network problem between two loops, will there be two instances of winscp? or will the second call terminate/replace the first one?

Reply with quote

Advertisement

You can post new topics in this forum