Dec 102017
Allows you to “ask” a question in a batch file. Returns ERRORLEVEL depending on yes or no response. | |||
---|---|---|---|
File Name | File Size | Zip Size | Zip Type |
ASK.COM | 256 | 128 | deflated |
ASK.DOC | 1152 | 572 | deflated |
Download File ASK.ZIP Here
Contents of the ASK.DOC file
Documentation for ASK.COMASK.COM Version 1.10, (C)Copyright T A Davis, 1983
This program is an enhancement to the batch environment for DOS 2.00
To use ask, include a line in your batch file like 'ASK Continue ? '
The operating system will display 'Continue ? ' on the default output
device and wait for a keypress from the keyboard. If any character
besides Y,y,N,n is pressed, the program will display 'Y/N ? ' and
wait for another keypress. Upon entering a valid key, the program will
set ERROR LEVEL to 0 or 1 depending on whether Yy or Nn was pressed.
As a further enhancement to earlier versions, now if ASK (C/R) is included
the program will supply a prompt of 'Press Y or N ? 'To interogate
ERRORLEVEL, use a batch file simular to the one listed below.
(BATCH FILE)
echo off
echo Batch file to test ASK.COM
:start
ask
if not errorlevel 1 goto yesin
echo You pressed N or n.
goto next
:yesin
echo You pressed Y or y.
:next
ask Want to do it again ?
if not errorlevel 1 goto start
(END OF BATCH FILE)
This program is an enhancement to the batch environment for DOS 2.00
To use ask, include a line in your batch file like 'ASK Continue ? '
The operating system will display 'Continue ? ' on the default output
device and wait for a keypress from the keyboard. If any character
besides Y,y,N,n is pressed, the program will display 'Y/N ? ' and
wait for another keypress. Upon entering a valid key, the program will
set ERROR LEVEL to 0 or 1 depending on whether Yy or Nn was pressed.
As a further enhancement to earlier versions, now if ASK (C/R) is included
the program will supply a prompt of 'Press Y or N ? 'To interogate
ERRORLEVEL, use a batch file simular to the one listed below.
(BATCH FILE)
echo off
echo Batch file to test ASK.COM
:start
ask
if not errorlevel 1 goto yesin
echo You pressed N or n.
goto next
:yesin
echo You pressed Y or y.
:next
ask Want to do it again ?
if not errorlevel 1 goto start
(END OF BATCH FILE)
December 10, 2017
Add comments