[英]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
$?
我相信shell脚本我们有命令
$?
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
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.