Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

Ups-auch-nicht-schlecht

OK, trapped again in the expansion problem, this works, thanks, G.

setlocal enabledelayedexpansion 

winscp.com /command "option batch abort" "option confirm off" "option echo on"  "open scp://root:root@radio" "bye" & echo *** Errorlevel !ERRORLEVEL!
martin

Re: winscp.com: Network timeout error with errorlevel 0

Your syntax is wrong. The %errorlevel% is resolved before whole line is executed. So what you are seeing is an exit code of previous command (line). In both cases.
Ups-auch-nicht-schlecht

winscp.com: Network timeout error with errorlevel 0

Hello,

I execute

winscp.com /command "option batch abort" "option confirm off" "option echo on"  "open scp://root:root@radio" "bye" & echo *** Errorlevel %ERRORLEVEL%


and expected - because the host is off - an errorlevel 1. I get the network timeout error, but an errorlevel 0:

batch           abort

reconnecttime   120
confirm         off
echo            on
open scp://root***@radio-maeuse
Searching for host...
Network error: Connection to "radio-maeuse" timed out.
*** Errorlevel 0


I'm using WinSCP.com, Version 5.6.1 (Build 4547) on Windows 7 64bit

Thanks, sincerely, Guido