Topic "Retrieve Exit Code from Session.ExecuteCommand"

Author Message
mxcolin
[View user's profile]

Joined: 2013-08-12
Posts: 3
Location: California
I'm using ExecuteCommand on the Session class to call a command remotely however I cannot get at the exit code?

CommandExecutionResult result = session.ExecuteCommand(command.Executable + " " + command.Arguments);

Will throw a SessionRemoteException if the command fails but there's no way to know what the exit code is?

Thanks

Colin
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
No, indeed there's no way to retrieve the exit code.
_________________
Martin Prikryl
mxcolin
[View user's profile]

Joined: 2013-08-12
Posts: 3
Location: California
Nuts Sad
mxcolin
[View user's profile]

Joined: 2013-08-12
Posts: 3
Location: California
Any plans for adding this in anytime soon?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
mxcolin wrote:
Any plans for adding this in anytime soon?

Will consider it. Meanwhile you can dump the exit code to the command output and parse it out yourself.
_________________
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