Batch File ReadMe


The stuff you need to know before you can write batch programs. 

Where to find the missing commands: If you have access to your Windows 95 CDROM, you can find almost everything in the \Other\Oldmsdos directory. If you're like me, you'll copy every bit of it into your \Windows\Command directory. If you don't have access to your CDROM, check out Microsoft's web site. The actual files (1.47 megabytes compressed) can be found at:
http://www.microsoft.com/windows/downloads/bin/W95olddos.exe
ftp://ftp.microsoft.com/Products/Windows/Windows95/CDRomExtras/OtherUtilities/olddos.exe
ftp://ftp.microsoft.com/softlib/mslfiles/olddos.exe
Other useful DOS commands are winset.exe and shortcut.exe. Winset lets you set environment variables globally (they persist once your batch file ends). Shortcut lets you make and modify shortcuts from the command line. You'll find both of these together as "envars.exe" on your CDROM under \Admin\Apptools\Envvars or from Microsoft at:
ftp://ftp.microsoft.com/Products/Windows/Windows95/CDRomExtras/AdministrationTools/ApplicationTools/envars.exe

Where to get help on DOS commands: You should already know about the /? option that every DOS command responds to. If you have Windows 95 you may wonder why you can't find DOS command help by using the Help icon on the Start menu. I wonder. But if you get the missing "OldDos" commands (see the item above), you'll get the HELP command. Actually, you don't need the HELP.COM file. All it does is run QBASIC with the undocumented /QHELP option (uppercase) which opens up the HELP.HLP data file. Yes, you get QBASIC.EXE and HELP.HLP with the OldDos stuff. You'll also find useful info (even if you thought you knew it all) by reading the text files in your Windows directory. If you installed Windows in your C:\Windows directory, I can save you looking for some of them by clicking these links (they point to your local drive) Config.txt, Msdosdrv.txt, Programs.txt, and Tips.txt.

How do I write batch programs: Geez, do I have to answer this? But people ask... You'd be surprised how many people are in that narrow transition period of knowing how to type commands, but not knowing how to put them together in a batch file. Here is the short version: Get yourself a DOS prompt. Type in the commands you need to do whatever it is you need to do. If your commands work, open up Notepad and type those SAME COMMANDS in the SAME ORDER. Don't type what appeared on the screen, just type what you actually typed in. Save that file with a bat extension ( For example "test.bat"). Now instead of having to type the commands, you can just double-click the batch file. Sure, your first batch file may only have two or three commands, but it counts. It's a batch program.

Bad links? Questions? Send me mail.