![]()
Batch files are simple programs which automate jobs which in DOS would otherwise have to be typed out by hand, line by line.
Below is an example of a very simple menu system so small it could be used to control several programs running directly from a floppy disk. This sort of programming would have been useful in the days when a home PC would not have had a Hard Drive but would have done everything from the floppy drive. One may have had a dozen or more programs on a single floppy (those were the days). The advice below is therefore about 10 years too late to be of any use. You might wish to try it out just for the fun of it.
The files are all to be stored in the route directory, A:\ and can be written from EDIT or NOTEPAD.
LIST.BAT
@ echo off
type list.doc
1.bat
@ echo off
CD program1 (or whatever the program directory is called)
program1 (or whatever the .exe or .com program is called)
CD A:\ (to return to the floppy route directory)
LIST (to launch the menu again)
Repeat for program 2,3,4 etc.
Now compose the document LIST.DOC from NOTEPAD substituting the actual plain English names of the programs but keeping the numbers at the end.
****************************************************************************
Program1...........................................1
Program2...........................................2
Program3...........................................3
To Choose a Program type the number on the end of the line.
*****************************************************************************
Just type LIST from the A:\> and away it goes. Obviously you can tart up LIST.DOC as much as you like using the keyboard characters available. It does save a lot of DIR commands to look up the exact names of all the files on the floppy.
Why Floppies?
Ever wondered why a floppy is called a floppy? Especially as they do not flop! The real floppies were the 5¼ inch? Not quite, the first floppies I remember were of the larger 10 inch variety. They really did flop about. They held if I remember correctly 180 KB. Not much but it still took a long time to fill one by typing from a keyboard. You had to hold them carefully and not walk too fast or they might bend or collide with someone and possibly crease them. The smaller 5¼ were a big improvement. The 3½ inch were so rigid in comparison that the name "Stiffies" was coined. It didn't catch on so floppies they remain. It also explains why Winchester drives are now called Hard Drives.
Why is there no B:\ drive?
As I mentioned before the original home PCs only had a floppy drive. The bees knees was the DOUBLE floppy drive machine. Now you could boot from the A:\ drive and run your programs from the B:\ drive without having to swap floppies. Or better still run your word processor from one drive and store your files on the other. You could also copy disks in one go. Before you had to swap disks several times as there was not enough available system RAM to do it in one go.
Naturally when Hard Drives came in they became the C: drive. The second floppy became redundant although when the stiffies came in there was a demand for both a 3½ and a 5¼ inch drive to transfer or maintain legacy compatibility.
There is nothing to stop you installing a second floppy drive today as the modern BIOS still supports it. Most floppy ribbon cables will even have a second connector just for this. If you examine it some of the wires in the ribbon are twisted. This part goes to the A: drive. The other connector for the B: is not. The reason for this is that originally there was a switch to set to decide which was the A: and which would be the B: drive. Then someone worked out that if you twisted some of the wires you could do away with the switch altogether.
Works fine with DOS and Windows 3.1 but not with Windows 98 which will refuse to even boot up until the B: drive is removed. It will however work if you boot up with a start up disk in the A: drive. The BIOS then supports it but it's really not a lot of use unless you want to do a lot of disk copying. I'm not sure about Windows 95, I seem to remember reading somewhere that it was 98 that first gave this problem.
Backing up the system files is always a good idea. I wrote a simple batch file to back them up onto a floppy whilst retaining a copy of the previous ones.
WINBAK.BAT
@ echo off
A:
DEL *.BAK
REN AUTOEXEC.BAT AUTOEXEC.BAK
REN CONFIG.SYS CONFIG.BAK
REN WIN.INI WIN.BAK
REN SYSTEM.INI SYSTEM.BAK
C:
CD C:\
COPY AUTOEXEC.BAT A:
COPY CONFIG.SYS A:
CD WINDOWS
COPY WIN.INI A:
COPY SYSTEM.INI A:
CP
..................................................................................................................................
The Files are AUTOEXEC.BAT,
CONFIG.SYS, WIN.INI & SYSTEM.INI.
It will first delete any file with the ".bak"
extension, then rename the existing ".bat, .sys, & .ini" files on
the floppy to a ".bak" extension then lastly copy the hard drive
system files to the floppy. The CP on the final line only applies if you have
the COUNTEPOINT GUI menu installed. Just substitute your DOS menu command or
"EXIT" if running from a DOS box under Windows.