Return values for system calls are a bit different. See the Perl documentation (third paragraph).
- TS
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
$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";
Thanks, but what about the other exit-codes such as 256?
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.