Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
In Perl, how to check for the remote folder existence using sftp command? Cant use Net:SFTPby Yedu (Acolyte) |
on May 25, 2016 at 14:31 UTC ( [id://1164077]=perlquestion: print w/replies, xml ) | Need Help?? |
Yedu has asked for the wisdom of the Perl Monks concerning the following question: Hi, As part of SFTP process, I need to validate the remote folder before sftp'ing the files. We cannot have the Net::SFTP module installed on our servers. I have written the following code to accomplish the same. *
* When I pass some wrong directory to $remote_dir, it is showing the information "Couldn't canonicalise: No such file or directory" in the command line. But finally, throwing the message "SFTP Completed Successfully". Can some one please help how to handle this? Is there any other variable that I should use instead of '$?' to check for the status?. Thanks in Advance.
Regards,
Back to
Seekers of Perl Wisdom
|
|