Posted: 2011-01-31 14:52
Hello, i want to sent an error e-mail only when connection is refused. How do i catch this, is there a error level or code to catch it?
If a file fails transferring, i don't want to send an e-mail.
It seems errorcode 1 is wider then what i want.
if errorlevel 1 goto error
log of connection refused:
. 2011-01-31 14:43:51.468 Looking up host "backuponline.webboy.nl"
. 2011-01-31 14:43:51.473 Connecting to 126.96.36.199 port 22
. 2011-01-31 14:43:53.581 Server unexpectedly closed network connection
* 2011-01-31 14:43:53.585 (ESshFatal) Server verbrak onverwacht de netwerkverbinding.
Posted: 2011-02-01 13:49
I want to detect if the IP has changed, because i use a access list. Thats what i'm trying to filter out with an errorlevel, to send mail. But errorlevel 1 seems to wide.
Location: Prague, Czechia
There's no simple solution. But you can use XML logging. If it contains just empty <session/> tag (like below) and exit code is 1, it is likely that the connection has failed for some reason.
<?xml version="1.0" encoding="UTF-8"?>
<session xmlns="http://winscp.net/schema/session/1.0" name="my session" start="2011-02-02T07:17:47.632Z">
You can post new topics in this forum
And it's free!