Demonstration Sequence 4 ======================== We've seen that a very simple program like GETIT.PAS, can write a new Batch file in response to user input, and that we can in fact CALL that "left-over" REPLY.BAT file to set environment variables for us, thereby solving the old problem of getting string input into a batch file. What else might be possible once we realize that batch files and programs can cooperate by simply establishing CONVENTIONS ... Well, if programs can write BATCH files, can BATCH files write programs? The answer is of course yes! I have a BATCH file at work that: (1) Calls a program like GETIT to get user keystroke input for some information like the names of some dBASE files to be processed and puts them in the environment via the "reply.bat" technique; (2) Writes a "DOIT.PRG" dBASE III program, using ECHO .... >> DOIT.PRG (3) Invokes dBASE, with the line: DBASE DOIT.PRG (4) On return from dBASE, cleans up by deleting DOIT.PRG etc. Anyway, an example like that is too long for this seminar, but you now know, IT CAN BE DONE, and the BASIC TECHNIQUE NEEDED. Here is an even 'stranger' use of the technique that programs can write (and REWRITE) batch files ...