Topic "errorlevel problem"

Author Message
trasumaka

Guest


Hi there

I created a small script.txt like this:

option batch on
option confirm off
open ged@192.168.69.50
option transfert binary
# Upload files to current working directory
put c:\temp
close
exit



and a test.bat like this:
rem @echo off
cd "\Program Files\Winscp3"
Winscp3.com /script=ged.txt
if errorlevel 1 goto error
echo "ok"
goto end
:error
echo Error: %errorlevel%
:end


I get the errorlevel = 1 but the winscp3 log tells me that:
...
. 2006-06-20 14:28:51.698 Opening remote file.
> 2006-06-20 14:28:51.698 Type: SSH_FXP_OPEN, Size: 63, Number: 136451
< 2006-06-20 14:28:51.698 Type: SSH_FXP_HANDLE, Size: 13, Number: 136451
> 2006-06-20 14:28:51.698 Type: SSH_FXP_WRITE, Size: 217, Number: 136966
. 2006-06-20 14:28:51.698 1 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
> 2006-06-20 14:28:51.698 Type: SSH_FXP_CLOSE, Size: 13, Number: 137220
> 2006-06-20 14:28:51.698 Type: SSH_FXP_SETSTAT, Size: 59, Number: 136713
< 2006-06-20 14:28:51.698 Type: SSH_FXP_STATUS, Size: 24, Number: 137220
< 2006-06-20 14:28:51.698 Status/error code: 0
< 2006-06-20 14:28:51.698 Type: SSH_FXP_STATUS, Size: 24, Number: 136713
< 2006-06-20 14:28:51.698 Status/error code: 0
. 2006-06-20 14:28:51.698 Closing connection.


Can somebody tell me why I don't get 0 ?


Thanks in advance for your help

Best regards

Ralf
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
It's because of "option transfert binary". There's no "transfert" option. It should be "transfer".
_________________
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