简体   繁体   中英

Batch script output logging into file

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

Sure.

yourCommand && (
   commands to execute upon success
) || (
   commands to execute upon failure
)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM