Topic "Errorlevel always 0 NT 4"

Author Message
Hopper
[View user's profile]

Joined: 2007-09-17
Posts: 1
Hi,

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

option batch abort
open user:password@example.com
put c:/localfile*.* /remotedir/
close

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

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

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License