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.

Options
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)

Options

Topic review

martin

Re: errorlevel problem

It's because of "option transfert binary". There's no "transfert" option. It should be "transfer".
trasumaka

errorlevel problem

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