If or statements

Score
0
Vote Up
November 6, 2010 at 17:56:04 Pacific
Specs: Windows XP

Is there any way to write an "IF OR" or a "IF AND" statement in a batch file?

Reply ↓  Report •


#1
Vote Down
Score
0
Vote Up
November 6, 2010 at 18:09:44 Pacific

You you have to write them out separately in batch files. For example, IF OR;

IF "%Var1%"=="1" ECHO Hello
IF "%Var1%"=="2" ECHO Hello

or, for IF AND;

IF "%Var1%"=="1" (
	IF "%Var2%"=="2" ECHO Hello
)

Can I put a question here?


Reply ↓  Report •
Reply to Message Icon Start New Discussion
Related Posts

« Delete/add lines in txt f... Sine Wave output file »

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.

Ask the Community!
Describe your Problem
Example: Hard Drive Not Detected on My PC