how to exit script in batch automation
Hi
in my batch, i need to exit the script if an error occurs. I know that if there is an error, the exit code = 1. My query (as a newbie to scripting) is how do i check the exit code and tell it what to do?
I have read your forum from top to bottom, and gone through your documentation and i cant figure it out.
My script is as follows
option batch on
open user:passwd@server
cd /home/dated directory
synchronize local 'server'
close
exit
if the dated directory is not present, i need to be able to automatically close the session (my error code is 2, response is 16). Normally, it would be something like if exit code = 1 exit but i cant get the syntax
many thanks for this great program
in my batch, i need to exit the script if an error occurs. I know that if there is an error, the exit code = 1. My query (as a newbie to scripting) is how do i check the exit code and tell it what to do?
I have read your forum from top to bottom, and gone through your documentation and i cant figure it out.
My script is as follows
option batch on
open user:passwd@server
cd /home/dated directory
synchronize local 'server'
close
exit
if the dated directory is not present, i need to be able to automatically close the session (my error code is 2, response is 16). Normally, it would be something like if exit code = 1 exit but i cant get the syntax
many thanks for this great program