How to check the error code of the put command
Hi all,
This is my first post here...
I have installed a client which is running very well. I have a new requirement though.
In my script I use put *.* to transfer multiple files. After the transmission is finished I move the files to a backup folder. At times the SFTP Server connection gets disrupted in the middle of the transmission (after transmitting let's say half of the files). As this leads to error code <> 0 of the complete script the files are not moved to backup folder which leads to some files being transmitted once again when the script runs next time.
My question: Is it possible to query the return code of the put command and only if the put command was successful do some action? (I would appreciate a small sample if poss.)
Thanks in advance for your support
SM
This is my first post here...
I have installed a client which is running very well. I have a new requirement though.
In my script I use put *.* to transfer multiple files. After the transmission is finished I move the files to a backup folder. At times the SFTP Server connection gets disrupted in the middle of the transmission (after transmitting let's say half of the files). As this leads to error code <> 0 of the complete script the files are not moved to backup folder which leads to some files being transmitted once again when the script runs next time.
My question: Is it possible to query the return code of the put command and only if the put command was successful do some action? (I would appreciate a small sample if poss.)
Thanks in advance for your support
SM