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

TS

Return values for system calls are a bit different. See the Perl documentation (third paragraph).
anand14

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
martin

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?
Klaus_1250

Thanks, but what about the other exit-codes such as 256?
martin

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.
Klaus_1250

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?