@echo off
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/log="C:\Temp\Log_%Date:~4,2%%date:~7,2%%date:~10,4%.log" /ini=nul ^
/command ^
"open sftp://username:password@10.99.36.292 -hostkey=""ssh-rsa 2048 """ ^
"open sftp://username:password@10.99.36.183 -hostkey=""ssh-rsa 2048 """ ^
Then it goes into the search for the SFTP folders for download of most recent data.
The error I get: Network Error: Connection to "10.99.36.292" refused.
This is the offline IP Address...the second one is the active one currently.
This can work too, but you need to set
option batch continue
before the first open
command to avoid the script exiting if the open
fails. After the first open
, you should reset back to option batch abort
.