Computing.Net > Forums > Disk Operating System > DOS Menu, Batch File

DOS Menu, Batch File

Reply to Message Icon

Original Message
Name: antonp
Date: July 12, 2008 at 13:48:13 Pacific
Subject: DOS Menu, Batch File
OS: DOS
CPU/Ram: 2048
Model/Manufacturer: IBM
Comment:

I have a batch file that creates a DOS menu where i can make a selection to do certain tasks for me from DOS. The menu boots fine, but i'm unable to make any selections....
I have copied the choice.com and choice.exe files to my shared folder.
Not 100% sure where these files should be and how i should call them for me to be able to make selections.

Here is my menu.bat file:

=======Begin=======
@ECHO OFF

:BEGIN
call simulate.bat
call pass.bat
goto begin
CLS
ECHO.
ECHO DOS UTILITIES MENU-PLEASE MAKE A CHOICE
ECHO.
ECHO.
ECHO 1=Remove All Hard Drive Partitions
ECHO 2=FDISK Hard Drive
ECHO 3=Format Hard Drive
ECHO 4=Dell Utilities
ECHO 5=Re-image
ECHO 6=Exit To DOS
ECHO.
ECHO To bring this menu back type GO.BAT at the dos prompt.
ECHO.
CHOICE /C:123456

pause

rem PICK A NUMBER (1, 2, 3, 4, 5, OR 6)%1
ECHO.
If ERRORLEVEL ==6 GOTO SIX
If ERRORLEVEL ==5 GOTO FIVE
If ERRORLEVEL ==4 GOTO FOUR
IF ERRORLEVEL ==3 GOTO THREE
IF ERRORLEVEL ==2 GOTO TWO
IF ERRORLEVEL ==1 GOTO ONE
GOTO END

:SIX
EXIT
GOTO QUIT

:FIVE
call re-image.bat
GOTO END

:FOUR
call dell.bat
GOTO END

:THREE
cd dos
call format.bat
GOTO END

:TWO
cd dos
call fdisk.bat
GOTO END

:ONE
cd dos
call blast.bat
GOTO END

:END
cd\
REM ECHO Completed. Bringing up DOS menu again...
REM pause
REM f:go.bat

:QUIT
f:

======End=======


Report Offensive Message For Removal


Response Number 1
Name: Mechanix2Go
Date: July 12, 2008 at 16:19:51 Pacific
Reply: (edit)

[1] What DOS?

[2] Have you tested either CHOICE.COM oe .EXE? The one you wil use needs to be in the path.


=====================================
If at first you don't succeed, you're about average.

M2


Report Offensive Follow Up For Removal

Response Number 2
Name: cup
Date: July 18, 2008 at 11:31:36 Pacific
Reply: (edit)

You could use goto LAB%ERRORLEVEL%
And label them LAB6, LAB5 etc.


Report Offensive Follow Up For Removal

Response Number 3
Name: Kevin Goodman
Date: September 11, 2008 at 01:03:46 Pacific
Reply: (edit)

The biggest problem I see is:

:BEGIN
call simulate.bat
call pass.bat
goto begin

I have no clue what is in those other batch files but I don't see any possible exit point after the 'goto begin' hence in my opinion your problem is that your menu program is stuck in an infinite loop hence calling simulate.bat and pass.bat over and over again instead of continuing down the batch file and generating your menu.

i may be wrong but if im not, i hope this helps.

I am zoog.


Report Offensive Follow Up For Removal

Response Number 4
Name: Mechanix2Go
Date: September 11, 2008 at 02:32:43 Pacific
Reply: (edit)

I guess since it waited for 2 months, it wasn't urgent. LOL


=====================================
If at first you don't succeed, you're about average.

M2


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: DOS Menu, Batch File

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 5 Days.
Discuss in The Lounge