0

I want to do logging of the below script for each command whether it is success or failure. I believe in shell script we have command $? to know whether the command executed is success or failure. Is there any way to achieve that in batch script?

open server
username
Password-1
bin
cd \Current_QA_DataLoad
put E:\AccountsInitialV6.txt
PAUSE
bye

Thanks in advance Vikram

1 Answer 1

2

Sure.

yourCommand && (
   commands to execute upon success
) || (
   commands to execute upon failure
)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.