In CMD, I could do Set /P ASK=REPEAT
and it would prompt the user for ASK
. How do I do this in MSDOS Batch Files? (No, no the ones that run on NT, but the ones that run on MSDOS.)
Btw: 'Set /P' is an NT answer so it doesn't work.
:(
In CMD, I could do Set /P ASK=REPEAT
and it would prompt the user for ASK
. How do I do this in MSDOS Batch Files? (No, no the ones that run on NT, but the ones that run on MSDOS.)
Btw: 'Set /P' is an NT answer so it doesn't work.
:(
How about one of these. . .
Resource: http://www.msfn.org/board/topic/174005-prompt-for-variable-in-dos-71/
Example test.bas could use:C:\DOS71\QBASIC /run test.bas
REM Get the users input.
INPUT "Enter the system Serial Number"; reply$
REM Show the value of the reply.
PRINT reply$
REM Return to the system.
SYSTEM
OR
editvar -p "Enter the system Serial Number." INPUT
rem temp.exe /ss %INPUT%
md %INPUT%
UPDATE
Online Emulator: https://archive.org/details/msdos_qbasic_megapack
Resource: https://support.microsoft.com/en-us/kb/81360
Editor is a full screen text editor. QBasic is a program that reads instructions written in Basic and interprets them into executable computer code.
The EDIT command starts Editor from the command prompt. QBASIC starts the QBasic Interpreter from the command prompt. Both Editor and QBasic may be executed with a switch or combination of switches to enhance or modify their performance. The following is a description of the switches available and how they affect Editor and QBasic:
Switch Description
------ -----------
/B Displays Editor or QBasic in black and white. This switch
should be used to run Editor or QBasic on a monochrome
monitor with a color graphics card. If the Editor or
QBasic pull-down menus do not show the short cut keys on a
CGA monitor, then use the /B switch when starting Editor
or QBasic.
/G Use this switch with a CGA monitor to provide the fastest
screen updating.
/H Use this switch to display the maximum number of lines on
the screen that the monitor supports.
/NOHI Editor and QBasic are designed for 16 color monitors, but
this switch allows Editor or QBasic to function on an
eight color monitor. If Editor or QBasic pull-down menus
do not show the short cut keys on a system that does not
support bold characters, use the /NOHI switch when
starting Editor or QBasic.
The following switches may be used only with QBasic:
Switch Description
------ -----------
/EDITOR Invokes Editor.
/MBF Converts the built-in functions MKS$,MKD$,CVS$, and CVD
to MKSMBF$, MKDMBF$, CVSMBF, and CVDMBF, respectively.
/RUN Runs a specified Basic program before displaying it.
To start Editor with the /NOHI switch, type the following command at the command prompt:
edit /nohi
To start QBasic and run the program MYPROG.BAS, type the following at the command prompt:
qbasic /run myprog.bas
Reference(s):
"MS-DOS User's Guide and Reference," versions 5.0 and 5.0a, pages 459, 547
This is an older way of doing input with an older DOS version. I don't have the older DOS version so its hard for me to test however I'll give you the code and the page that shows various ways of doing input for older versions of DOS. Here's the code.
ECHO Enter some input, and press Enter when ready . . .
ECHO ?[13;0;64;13p
COPY CON USRINPUT.TMP
ECHO ?[13;13p
CLS
ECHO You typed:
TYPE USRINPUT.TMP
Check out this site for more examples.
CHOICE is a command that exists in MSDOS 6.22 and I presume in 7.1 as well, although the exact syntax may vary. Example:
CHOICE /C:YN /T:N,10 Do you want to continue
IF ERRORLEVEL 2 GOTO :eof
ECHO You chose Y, continuing
:eof
/C option allows you specify permitted options /T option allows you to specify a default option and a timeout
Try CHOICE /?
to get details for your DOS version.