WinSCP Exit Codes

Advertisement

Klaus_1250
Guest

WinSCP Exit Codes

I'm writing a perl-script that uses WinSCP in console batch mode to retrieve some files. Works great!

BUT, I cannot find any documentation about the exit codes WinSCP produces. Anyone?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: WinSCP Exit Codes

I have updated scripting/automation chapter.

WinSCP returns exit code 1, when any command is interupted due to an error or any prompt is answered Abort (even automatically in batch mode). Otherwise it returns exit code 0.

Reply with quote

martin
Site Admin
martin avatar

Klaus_1250 wrote:

Thanks, but what about the other exit-codes such as 256?
I'm not aware that WinSCP ever returns exit code 256. Why do you think so?

Reply with quote

anand14
Joined:
Posts:
2
Location:
Baltimore, MD

Exit code 256

I got an exit code of 256 from winscp when I used it at the command line. I have googled for "exit code 256 WinSCP" and there are not many applicable results.

I checked the FAQs on WinSCP and searched the Forums. There is no information on this exit code. It is really bugging me.

I am using a Perl Script on WINDOWS as well and am using this inside my script:

$ftpCheck2=system("winscp.com /console /script=D:\\Interface_N\\FSH_COMPASS\\Midnight\\MOD\\template_IEPROD.txt");
print STDOUT "The value of ftpCheck2 is $ftpCheck2\n";
OUTPUT: The value of ftpCheck2 is 256

I get a value of 256 for the exit code. (And NO, it is not due the double backslashes, I am just "escaping" the backslash character with a backslash)

Any info will be appreciated.

Thanks,
Sincerely,
Anand

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum