I am in process to create a AUTOMATED setup of SFTP.
In which at regular interval, my script will connect to SFTP server and get and put files. And in case of error would send a mail to the respective group.
Now issue is, how to track all error codes, for which I need to send mails.
Since let say there is no files to get, it will return error and I get a mail which is not useful.
If I could get all error code returned by WINSCP and how to pass the same error in my calling script. SO that I could manage the email sending part based on this.
Perhaps I am not clear, so If you have any question, please let me know and kindly help.