Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Uploading file to several servers fails

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
Flanders

Uploading file to several servers fails

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