| 1. |
Solve : Menu Batch not working? |
|
Answer» I am trying to get this menu batch to work but every time I run it it just scrolls threw start to command prompt. I don't have choice on my comp where can i get it if not is there a other way to get the menu to work. You can use SET /P with IF and that will work just as well. Code: [Select]:loop set /p choice= if %choice% == 1 goto 1 if %choice% == 2 goto 2 if %choice% == 3 goto 3 if %choice% == 4 goto 4 Echo You must enter EITHER 1, 2, 3 or 4! goto loop Modify that to your uses, but it should fit fine.Code: [Select]@Echo off :start cls echo echo Main Menu echo echo 1.Clear Backup disk echo 2.Backup Files echo 3.Restore Data echo 4. Quit echo echo echo echo. echo. echo =============================== choice /c [:]1.2.3.4. Enter option echo =============================== Echo. If %Errorlevel%==4 Goto Exit If %Errorlevel%==3 goto 3.bat If %Errorlevel%==2 goto 2.bat If %Errorlevel%==1 goto 1.bat Batch can't use letters / symbols not on your keyboard.Could you please clarify? |
|