You can:
1. Specify letters instead of numbers associated to the options (the simpler solution).
2. Use another way of getting user input, which would be like you described - only finished when user hits enter. That is covered in my FAQ #06 - get user input.
3. Use a combination of CHOICE prompts. Something like this:
@echo off
echo Choose an option:
echo.
echo [01] Option 1
echo [02] Option 2
(...)
echo [20] Option 20
:choice
CHOICE /c:120 /n > nul
for %%? in (1 2) do if errorlevel=%%? set d1=%%?
if errorlevel=3 set d1=0
CHOICE /c:1234567890 /n > nul
for %%? in (1 2 3 4 5 6 7 8 9) do if errorlevel=%%? set d2=%%?
if errorlevel=10 set d2=0
if "%d1%"=="2" if not "%d2%"=="0" goto choice
echo You've chosen option %d1%%d2%
The prompt messages ("[1,2]?") won't be displayed, so the interface looks like a single prompt for a 2-digit-number. However, as you can see, that method is not very neat, there are some difficulties associated to it, like the problem avoided by the line before the last line of code - if the user hits 2 on the first prompt and then anything other than 0 on the second prompt, that isn't a valid option and we must get back to the prompting. If more options were avaliable, like 21 22 23, it would take more trouble to make sure the entry is valid.
I recommend using method 1, unless you've got a relevant reason to use method 2 or 3.
-- Leonardo Pignataro - Secret_Doom --
secret_doom@hotmail.com
www.batch.hpg.com.br
________________________________________________________________