Can anyone help me do a batch file.

October 26, 2010 at 15:12:10
Specs: Windows XP
Pls help me do a batch file for this situation..
if x=1 goto command1
if x=2 goto command 2
if x=3 goto command 3
if x=1 2 goto command 1, command2
if x= 1 2 3 goto command 1, command 2, command 3

Thanks in advance...


See More: Can anyone help me do a batch file.

Report •


#1
October 26, 2010 at 18:55:50
Open the prompt, and type "IF /?". Read that.

IF "%Var%"=="1" Command 1
IF "%Var%"=="2" Command 2
Etc...

Good luck.

Can I put a question here?


Report •

#2
February 23, 2011 at 08:24:51
pls help.

Report •

#3
February 24, 2011 at 02:23:05
set NAME=Bob
if %NAME%==bob echo Hi Bob!
if not %NAME%==Bob echo Your not Bob!
pause
exit

Happy is ONE who says I am an OttoMAN.


Report •

Related Solutions


Ask Question