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

Guest

Ohhhh Great
I thought .exe with /console was the same as .com
Now it works

Thanks
martin

You need to use winscp.com instead of .exe.
elflord

Wrong return value when using /command option

The return value is probably as it should be - I just fail to understand why. :(

My computer is Windows Server 2003 X64
My version of WinSCP is 4.2.9

When I use the command option in WinScp I would expect the return value to be 1 if just one of the commands are invalid. It doens't seem to be the case however.

Below is a (extremely) simple example:

C:\winscp429>WinSCP.exe /console /command "sds" "exit"
C:\winscp429>echo %errorlevel%
0


The first command is invalid, but still winScp returns 0 - can someone please explain why.
How can I be sure my dynamic scripting worked as planed?
I get the same result in a more advanced case where I connect to a sftp site with an invalid privatekey.