WinSCP with commandline and script

Advertisement

timeout notworking??
Guest

WinSCP with commandline and script

I have a little script for using winscp.com as SFTP Client.

The important execute is:
"C:\Program Files\WinSCP3\winscp3.com" /console /script="C:\Program Files\WinSCP3\example.cmd" /log=winscp.log /timeout=30

And now a little example from our logfile:
. 2009-07-08 12:30:01.040 Using SSH protocol version 2
. 2009-07-08 12:30:01.072 Doing Diffie-Hellman group exchange
. 2009-07-08 12:30:01.150 Doing Diffie-Hellman key exchange with hash SHA-1
. 2009-07-08 12:30:01.244 Host key fingerprint is:
. 2009-07-08 12:30:01.244 ssh-rsa 1024 de:ee:7e:fe:30:2c:bd:95:1d:00:94:d4:90:ba:d5:94
. 2009-07-08 12:30:01.244 Initialised AES-128 SDCTR client->server encryption
. 2009-07-08 12:30:01.244 Initialised HMAC-SHA1 client->server MAC algorithm
. 2009-07-08 12:30:01.244 Initialised AES-128 SDCTR server->client encryption
. 2009-07-08 12:30:01.244 Initialised HMAC-SHA1 server->client MAC algorithm
! 2009-07-08 12:30:01.322 Using username "XXXXX".
. 2009-07-08 12:30:26.337 Waiting for data timed out, asking user what to do.
. 2009-07-08 12:30:26.337 Asking user:
. 2009-07-08 12:30:26.337 Der entfernte Rechner hat seit 25 Sekunden nicht geantwortet.

. 2009-07-08 12:30:26.337
. 2009-07-08 12:30:26.337 Weitere 25 Sekunden warten? ()
. 2009-07-08 12:30:26.337 Attempt to close connection due to fatal exception:
* 2009-07-08 12:30:26.337 Abgebrochen durch Benutzer.
. 2009-07-08 12:30:26.337 Closing connection.
You can see, the other side has not give a reply in 25 seconds.
BUT, i used the timeout time with 30 seconds ..
WHY closed the connection (winscp) after 25 seconds ??!!??
Any ideas??

I am using the v4.1.9 release.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: WinSCP with commandline and script

From your command-line I suppose that you open session from the script using open command (what is right). In that case you have to add -timeout switch directory to open command. /timeout switch on commandline applies only if you open session from command line parameter (what would be wrong for scripting).
_________________
Martin Prikryl

Reply with quote

ZOC
Guest

TimeOut

Sorry ... but i dont understand this.
How is see, i can ONLY set the timeout in the commandline.
I think, i cant set a timeout command in the script (where i have "option batch on" and my "open xxxxxxx" and so on).
I looked in the docu and cant find the timeout for that.

Please, maybe you can write me more to do that.

My command line call, you can this this in my first post.
My script look like this:
#
# Automatically answer all prompts negatively not to stall
# the script on errors
option batch on

# Disable overwrite confirmations that conflict with the previous
option confirm off

# Connect
open XXXXXXXXXX

# Force binary mode transfer
option transfer binary


cd /EARN/outbox/
get *.* C:\Inetpub\ftproot\Eingang\
rm *.*

cd /EARN/inbox/
put C:\Inetpub\ftproot\Ausgang\*.* ./

# Disconnect
close
# Exit WinSCP
exit

Whats to do ??!!?
many thanks ...

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: TimeOut

ZOC wrote:

How is see, i can ONLY set the timeout in the commandline.
You can set timeout as switch to open command.
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum