Topic "Errorlevel always 0 NT 4"

Author Message
[View user's profile]

Joined: 2007-09-17
Posts: 1

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!
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24759
Location: Prague, Czechia
Can you try simpler syntax:
if errorlevel 1 goto retryloop
Martin Prikryl

You can post new topics in this forum

Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License