1. ELSE

          Else is an option for the IF command

          IF [NOT] EXIST filename (command) ELSE (command)

          When combining an ELSE statement with parentheses, always put the opening parenthesis on the same line as ELSE.
          This is because CMD does a rather primitive one-line-at-a-time parsing of the command.

          so

          … ) ELSE ( …

          will work, but

          … )
          ELSE ( …

          will fail.

          If you follow this rule, you can nest mutiple IF commands to in effect provide an ELSEIF.
          Add parenthesis where needed:

          … ) ELSE ( IF condition ( action_if_True ) )

          ) ELSE IF condition ( action_if_True )

          ) ELSE IF condition action_if_True

          Examples

          IF EXIST sample.txt (Del File.txt) ELSE (copy File1.txt File2.txt)IF %1==dev (Echo Found Dev   ) Else ( If %1==tst (                       Echo found Tst                       ) ELSE ( If %1==trn                               Echo found Train                              )           )

          “Confidence comes not from always being right but from not fearing to be wrong” - Peter T. Mcintyre

          Related:

          IF command


           
          Copyright © 1999-2020 SS64.com
          Some rights reserved
          1. http://www.wqfslzn0.tw | http://m.wqfslzn0.tw | http://wap.wqfslzn0.tw | http://3g.wqfslzn0.tw | http://4g.wqfslzn0.tw | http://5g.wqfslzn0.tw | http://mobile.wqfslzn0.tw | http://vip.wqfslzn0.tw | http://ios.wqfslzn0.tw | http://anzhuo.wqfslzn0.tw | http://8b496.wqfslzn0.tw | http://956.wqfslzn0.tw | http://a7e.wqfslzn0.tw | http://ac.wqfslzn0.tw | http://a.wqfslzn0.tw | http://3f4.wqfslzn0.tw | 抖音喷射门视频在线观看