I am having this element in a batchfile of mine:
=CODE===
:CHECKUSERINPUT
SET /A "MyVarIdeasAmountEvaluated=%MyVarIdeasAmount%"
IF %MyVarIdeasAmountEvaluated% EQU %MyVarIdeasAmount% (
REM if equal then it is an integer! Else it is e.g. a character.
IF %MyVarIdeasAmount% GEQ 1 (
IF %MyVarIdeasAmount% GTR 1000 (
:ASKOVER1000
SET /P "MyVarContOver1000=Fortfahren mit %MyVarIdeasAmount%
Verzeichnissen (J f r Ja, N f r Nein) "
IF /I "%MyVarContOver1000%" EQU "J" GOTO EXECUTE
IF /I "%MyVarContOver1000%" EQU "N" GOTO START
GOTO ASKOVER1000
)
GOTO EXECUTE
)
)
ECHO Bitte geben Sie eine positive Ganzzahl ein!
GOTO START
=/CODE===
when executing the file and it comes to the :ASKOVER1000, the program is
asking me always TWICE!
With other words: I am entering e.g. "J" which should jump to :ECECUTE,
but he ignores it and walks to GOTO ASKOVER1000 and jumps back to
:ASKOVER1000. I reenter "J" and then he finally jumps to :EXECUTE.
Same if I enter "N".
What am I doing wrong?
Thanks for any advice!
Tom
(f'up to alt.msdos.batch)