MartinC.
Baseband Member
- Messages
- 56
Okay, I have a batch file that I was making, and I want it to put down a random number, so that I can make it preform a random command. I know you can use the %random%. But I want i to generate either a 1 or a 2.
Not a 1 2 or any other number to 3 thousand something like the random command does. Here is an example of what I want to do. (below).
Now how do I make it either go to pie or cheese (at random).
If you don't understand what I'm asking, please ask me to restate it in
different words. Thanks in advance
@ECHO OFF
CLS
:Title
ECHO.
echo
ECHO.
pause
GOTO cheese
GOTO pie
@ECHO OFF
CLS
:cheese
ECHO.
echo
ECHO.
pause
@ECHO OFF
CLS
ie
ECHO.
echo
ECHO.
pause
Not a 1 2 or any other number to 3 thousand something like the random command does. Here is an example of what I want to do. (below).
Now how do I make it either go to pie or cheese (at random).
If you don't understand what I'm asking, please ask me to restate it in
different words. Thanks in advance
@ECHO OFF
CLS
:Title
ECHO.
echo
ECHO.
pause
GOTO cheese
GOTO pie
@ECHO OFF
CLS
:cheese
ECHO.
echo
ECHO.
pause
@ECHO OFF
CLS
ie
ECHO.
echo
ECHO.
pause