Category : Batch File Utilities - mostly for DOS
Archive   : ABFS.ZIP
Filename : ADVBAT15.TXT

 
Output of file : ADVBAT15.TXT contained in archive : ABFS.ZIP
Demonstration Sequence 3
========================

A common problem for BATCHmen is the "inability" to get any user
input into a BATCH file, other than a single keystroke that sets the
ERRORLEVEL variable, much as does ASK.COM here.

Several work-around's exist for this sticky problem, and we will now
explore some of them.

First, let's say we are going to want to get a NAME and a PHONE number
into the batch file's ENVIRONMENT.

We already know that, in the absence of CALL, any program we invoke will
have a hard time setting environment variables, because the environment
of the program is a COPY of the batch file's environment that gets
thrown away on return from the program.

Secondly, writing a program that MODIFIES the environment is a non-trivial
chore, that most of us would like to avoid.

Let's get creative then, and avoid programming anything other than the
simplest possible routine, one that simply prompts for a NAME and PHONE
and simply WRITES THE VALUES TO A FILE.

For example, look at the code for GETIT.PAS, which follows.

Even if you do not know PASCAL, you see that all it does is (1) ask for
the user to type in a NAME and a PHONE; (2) Writes these values to a
file.

However, Note the NAME OF THE FILE IT WRITES .... REPLY.BAT !!!!





  3 Responses to “Category : Batch File Utilities - mostly for DOS
Archive   : ABFS.ZIP
Filename : ADVBAT15.TXT

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/