Topic "Uploading file to several servers fails"

Author Message
Flanders

Guest


Hi,

I have several servers that I frequently uploads a file to. I use a script like this:

--------------------------------------------------
option batch abort
option confirm off

open ftp://xxx:xxx@10.0.161.17 -timeout=30
put "C:\Documents and Settings\Updating tool\CSW0070.exe" /Update/*
open ftp://xxx:xxx@10.0.161.25 -timeout=30
put "C:\Documents and Settings\Updating tool\CSW0070.exe" /Update/*
open ftp://xxx:xxx@10.0.161.65 -timeout=30
put "C:\Documents and Settings\Updating tool\CSW0070.exe" /Update/*

exit

--------------------------------------------------

My problem is that if when my script tries to connect to a server that is offline, then the script stops/fails, I get the following message: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

Is there any way to force WinSCP to skip the server that is offline and try the next server in the script?

Thanks!

--
Flanders
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
You should create a separate script for each server.

Or you can have just one script and pass a different hostnames as a parameter. For that see:
https://winscp.net/eng/docs/scripting#syntax
_________________
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