Sign in with
Sign up | Sign in

Batch file help plz ><

Last response: in Windows XP
Share

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

Ask the community
!