I am using JAVA (Runtime.exec()) to execute a perl script which uses system() to execute a ftp command.
The ftp command consist of ("\n" separated) open, user, cd, mkdir, mget/mput, etc and then bye.
The perl script system() function will execute that single ftp command.
My question is:
Does perl know if any part of the ftp command failed? e.g. if "cd <directory>" failed but the rest of the ftp command works, does perl get some kind of error status/number from the system()?
The only thing I can do right now is pipe the ftp outputs to a log file and check it manually. Is there a different way?
I would hate to use JAVA to open the log file and look for error messages.
Any help would be appreciated.
Thanks.
The ftp command consist of ("\n" separated) open, user, cd, mkdir, mget/mput, etc and then bye.
The perl script system() function will execute that single ftp command.
My question is:
Does perl know if any part of the ftp command failed? e.g. if "cd <directory>" failed but the rest of the ftp command works, does perl get some kind of error status/number from the system()?
The only thing I can do right now is pipe the ftp outputs to a log file and check it manually. Is there a different way?
I would hate to use JAVA to open the log file and look for error messages.
Any help would be appreciated.
Thanks.