home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 December
/
simtel1292_SIMTEL_1292_Walnut_Creek.iso
/
msdos
/
pctech
/
bestof.arc
/
UTILITY.ARC
/
ASKDEMO.BAT
next >
Wrap
DOS Batch File
|
1987-11-02
|
466b
|
24 lines
REM ASKKEY test
ECHO OFF
:GETKEY
ASKKEY Press Y or N
Rem Error if above 'Y'
IF ERRORLEVEL 90 GOTO ERROR
Rem Ok if = 'Y'
IF ERRORLEVEL 89 GOTO YES
Rem Error if Above 'N', below 'Y'
If ERRORLEVEL 79 GOTO ERROR
Rem OK if = 'N'
IF ERRORLEVEL 78 GOTO NO
Rem Else fall into error
:ERROR
Echo Wrong key pressed. Try again
GOTO GETKEY
:YES
ECHO Option "YES" was selected
GOTO EXIT
:NO
ECHO Option "NO" was selected
:EXIT
ECHO ASKKEY test completed.