Hi,
Does anybody know how to extract the value that is enterd at the blinking cursor in DOS. I am just a beginner at this. I have batch file that gives some options and then i use the pause command to keep the cursor at one point for user input. How can i extract this value to execute my other statements based on this value...
the code i have written is this... i know i am just playing around, but i want to learn stuff..
Code:
@echo off
:start
echo Hello, Here are some Batch File Options:
echo ========================================
echo 1. Calculator
echo 2. Internet Explorer
echo 3. Other
echo 4. Quit
echo ========================================
here:
echo Enter numeral options...
%1
set op=%1
@pause >nul
shift
if op==1 goto option1
else if op==2 goto option2
else if op==3 goto option3
else if op==4 goto option4
:option1
start calc.exe
goto here
:option2
start iexplore.exe
goto here
:option3
start cmd.exe
goto here
:option4
exit
@echo on
I think my main issue is extracting the input.. if its some toher issue, please let me know.
Cheers.
Bookmarks