error bad command or file name

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
flyhigh427
Posts: 7
Joined: 07 Mar 2010 09:14

error bad command or file name

#1 Post by flyhigh427 » 28 Jun 2010 11:55

hi
im using windows 98 boot disk.
i seem to be getting the error around the choice part i think
could anyone help
thanks

Code: Select all

@echo off
:menu

cls
echo    programs MENU
echo    ==========
echo.
echo    1 - pqmagic
echo    2 - pqdi
echo    3 - editbini
echo    4 - ghost3
echo    5 - ptedit
echo    6 - Quit
echo.
choice /c:123456>nul

if errorlevel 6 goto done
if errorlevel 5 goto ptedit
if errorlevel 4 goto ghost3
if errorlevel 3 goto editbini
if errorlevel 2 goto pqdi
if errorlevel 1 goto pqmagic

goto menu

:pqmagic
cd pmdos
pqmagic
goto menu


:pqdi
cd pqdi
pqdi
goto menu

:editbini
cd editbini
editbini
goto menu

:ghost3
cd ghost3
ghost
goto menu

:ptedit
cd ptedit
ptedit
goto menu


aGerman
Expert
Posts: 4678
Joined: 22 Jan 2010 18:01
Location: Germany

Re: error bad command or file name

#2 Post by aGerman » 28 Jun 2010 12:48

It's not that easy to answer.
Indeed you would need choice.exe to use the CHOICE command. Idk if you can use it on your boot disk. Download it (direct download link!):
ftp://ftp.microsoft.com/Services/TechNet/samples/PS/Win98/Reskit/SCRPTING/CHOICE.EXE
and save it in the same folder where the batch file is placed. Hope that helps.

Regards
aGerman

flyhigh427
Posts: 7
Joined: 07 Mar 2010 09:14

Re: error bad command or file name

#3 Post by flyhigh427 » 28 Jun 2010 14:43

that did it thanks

Post Reply