Computing.Net > Forums > Programming > Using a Modulus Help

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Using a Modulus Help

Reply to Message Icon

Name: Taka
Date: October 25, 2009 at 19:11:26 Pacific
OS: Windows XP
Subcategory: Batch
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: klint
Date: October 26, 2009 at 10:04:45 Pacific
Reply:

set /a testMod2 = test % 2
if %testMod2% == 0 etc...


0
Reply to Message Icon

Related Posts

See More


user input line-editor Splitting content of env ...


Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: Using a Modulus Help

Using a help file www.computing.net/answers/programming/using-a-help-file/13655.html

Using a macro in excel to copy data www.computing.net/answers/programming/using-a-macro-in-excel-to-copy-data/7953.html

ASP - using a variable in a Do Loop www.computing.net/answers/programming/asp-using-a-variable-in-a-do-loop/6352.html