Using a Modulus Help

October 25, 2009 at 19:11:26
Specs: Windows XP
I am running the below batch file to try and prompt 3 different .exes to execute.

1 - If test = 1 Then run d:\retech\common\rslsqlexec.exe
2 - If test is even The run d:\retech\gm\bin\gmautoexec.exe
3 - If test is not 1 or is odd Then run d:\retech\gm\bin\gmautoexecmtc.exe

What I've written so far:
@ECHO OFF
set /p test=ENTER #:
IF %test% equ 1 (d:\retech\common\rslsqlexec.exe) ELSE (IF %test% equ 0 (d:\retech\gm\bin\gmautoexec.exe) ELSE d:\retech\gm\bin\gmautoexecmtc.exe)

Thanks


See More: Using a Modulus Help

Report •


#1
October 26, 2009 at 10:04:45
set /a testMod2 = test % 2
if %testMod2% == 0 etc...

Report •
Related Solutions


Ask Question