批处理脚本输出登录到文件

时间:2012-10-11 10:15:38

标签: windows batch-file

我想为每个命令记录下面的脚本,无论是成功还是失败。我相信在shell脚本中我们有命令$?来知道执行的命令是成功还是失败。有没有办法在批处理脚本中实现它?

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

提前致谢 维克拉姆

1 个答案:

答案 0 :(得分:2)

不确定

yourCommand && (
   commands to execute upon success
) || (
   commands to execute upon failure
)
相关问题