|
Answer» Does anybody know what the correct syntax is for an OR condition in an IF STATMENT for a login script? What I want to do is something like this:
IF "%HOST%"=="TS01" OR "%HOST%"=="TS02" GOTO NEWTS
ThanksIf you're talking about a BATCH login file then there is no OR condition for an IF. Better to break it up into two statements.
Code: [Select] IF "%HOST%"=="TS01" goto newts if "%host%"=="TS02" goto newts
Under XP, you could use a ELSE statement with IF
Example:
IF NOT string1==string2 ( ECHO STRING 1 ) ELSE ( ECHO STRING 2 )
You could use IF EXIST filename.txt ( ECHO DOES EXIST ) ELSE ( ECHO DOES NOT EXIST )
You must adhere to the open brackets schema . This can be used successfully in a FOR LOOP.
|