Topic "WinSCP Exit Codes"

Author Message
Klaus_1250

Guest


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?
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
I have updated scripting/automation chapter.

Quote:
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.

_________________
Martin Prikryl
Klaus_1250

Guest


Thanks, but what about the other exit-codes such as 256?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
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?
_________________
Martin Prikryl
anand14
[View user's profile]

Joined: 2007-07-25
Posts: 2
Location: Baltimore, MD
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
TS

Guest


Return values for system calls are a bit different. See the Perl documentation (third paragraph).
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