Computing.Net > Forums > Programming > Batch fle RANDOM

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.

Batch fle RANDOM

Reply to Message Icon

Name: kittybobjr
Date: October 28, 2009 at 15:36:34 Pacific
OS: Windows XP
Product: Microsoft Windows xp professional edition
Subcategory: Batch
Comment:

Hello, i need a batch file that will RANDOMLY GOTO a certain area


EXAMPLE

it selects a random area (area = :MENU, :MENU2 ... ect)

So each time i open it, it will go to a certain area



Sponsored Link
Ads by Google

Response Number 1
Name: dtech10
Date: October 28, 2009 at 16:37:42 Pacific
Reply:

Hi Kittybobir

@echo off
cls
set /a R=%random%%%5
goto Menu%R%
exit /b


:Menu0
echo Menu%R%
exit /b

:Menu1
echo Menu%R%
exit /b

:Menu2
echo Menu%R%
exit /b

:Menu3
echo Menu%R%
exit /b

:Menu4
echo Menu%R%
exit /b


0
Reply to Message Icon

Related Posts

See More


Inodes in DOS Create text file based on...


Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: Batch fle RANDOM

Batch Select Random File www.computing.net/answers/programming/batch-select-random-file/15002.html

Batch:Getting random line from file www.computing.net/answers/programming/batchgetting-random-line-from-file/16304.html

Batch File Random Number www.computing.net/answers/programming/batch-file-random-number/18837.html