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.

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)


Topic review


Re: Errorlevel always 0 NT 4

Can you try simpler syntax:
if errorlevel 1 goto retryloop

Errorlevel always 0 NT 4


Im using a simple put winscpscript.txt to scp a file:

option batch abort
put c:/localfile*.* /remotedir/

On the other hand, Im using a NT batch like this:

:retryloop /script=winscpscript.txt
echo errorlevel=%errorlevel%
if %errorlevel% neq 0 goto retryloop
delete localfile*.*

Unfortunately, the exit code is ALWAYS 0, which means that the local file is always deleted even if
you plug off the network cable.
Of course, theres a timeout of winscp.
Ive read all your docs and suggestions about this topic and tried out a lot of things to check if NT4 has a problem with errorlevels but I still cant find why you always return 0.

Please help!

Thanks in advance!