Sign in with
Sign up | Sign in
Your question

Batch file help plz ><

Last response: in Windows XP
Share
May 21, 2007 3:30:48 PM

Hey

I was ask to create a batch file that will prompt the user using the CHOICE and GOTO commands.

[code:1:5b30a46df0]
@echo off
cls
REM create menu
echo *****************
echo * f = Notepad *
echo * n = Explorer *
echo * e = Control Panel*
echo *****************


REM offer choice to user
choice /e nec /f "Enter the program you wish to open:"


REM if user enters C, run Control Panel
if not errorlevel 3 goto exp
control.exe
goto end

:exp
REM if user enters E, run Explorer

if not errorlevel 2 goto note
explorer.exe
goto end

:note
REM if user enters N, run notepad
if errorlevel 1 notepad.exe
goto end

:end

[/code:1:5b30a46df0]

When i run the batch file i get:
"choice" is not recognized as an internal or external command,operable program or batch file.

Could some one take a look and suggest a way to fix it please.

thank for your time

More about : batch file plz

May 21, 2007 5:04:09 PM

Do you have Choice in your path?
May 21, 2007 5:28:00 PM

Quote:
Do you have Choice in your path?


No real restrictions just want it to work lol
May 22, 2007 5:45:20 PM

Quote:
Do you have Choice in your path?

No real restrictions just want it to work lol
If you did, it probably would.
!