Error handling

Advertisement

litestream
Joined:
Posts:
1
Location:
UK

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.

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum