Home NT NT Syntax
NT Syntax : Conditional Execution

SYNTAX

An AND list of commands has the form

      command1  && command2

command2 is executed if, and only if, command1 succeeds.


A single & will always execute both commands
      command1 & command2


An OR list of commands has the form

      command1  || command2

command2 is executed if, and only if, command1 fails

eg

   COPY Z:\Oracle\TNSnames.ORA C:\ORANT\ || ECHO The Copy Failed
Related commands:

also see the IF command



Simon Sheppard
SS64.com