Error handling
I use the following simple script to connect to a remote site, copy any files there to a local site and then delete the remote files.
open sftp://user:password@ip address
cd /sage
get *.* c:\FTP\incoming\
rm *.*
exit
Is there any error checking I can introduce to prevent the remote files being deleted if the transfer is unsuccessful, or will the rm command not execute and time out if the previous get line does not complete?
Any assistance would be greatly appreciated.
open sftp://user:password@ip address
cd /sage
get *.* c:\FTP\incoming\
rm *.*
exit
Is there any error checking I can introduce to prevent the remote files being deleted if the transfer is unsuccessful, or will the rm command not execute and time out if the previous get line does not complete?
Any assistance would be greatly appreciated.