Section I: Batch File Structure. This section shows you how to structure your batch files for maximum usefulness and easy understanding. The chapters in this section are:
Chapter 1 Anatomy of a Batch File. It's much easier to write and use batch files if they follow a particular structure and certain commands always work. This chapter covers these concepts.
Chapter 2 Hiding Everything A Batch File Does. If you structure your batch files properly, you can hide as much of what goes on as you like. You can even hide those stubborn DOS messages that turning echo off and piping to NUL does not hide!
Section II: Working With Batch Files. This section shows you how to make the batch files themselves work better. This, in turn, allows your batch files to be more powerful. The chapters in this section are:
Chapter 3 Batch File Help. Because DOS limits file names to eight characters or less, it's often difficult to look at a program name and figure out exactly what that program does-especially if you have not used it for a while. Using batch file help, you can quickly find out what a particular batch file does.
Chapter 4 Batch Files That Use Less Space. Because DOS allocates a full cluster to each file not matter how small it is and because you tend to have a lot of batch files, your batch files can end up taking up a lot of space on your hard disk. This chapter shows you how to reduce the space used by your batch files.
Chapter 5 Counting In Batch Files. Wouldn't it be nice if your batch files could count and perform simple mathematics? Well, they can and this chapter shows you how.
Section III: Working With DOS. The primary use for batch files is to improve the way DOS operates. This section will show you ways to improve DOS with batch files that you may have never even considered. The chapters in this section are:
Chapter 6 Running Multiple Commands And Other Command Line Enhancements. If you have DOS 5.0, then you know how nice it is to be able to enter multiple commands on one command line. You also know how nice it is to use DOSKEY to write macros and recall command lines you have already entered. If you don't have DOS 5.0 or you don't like the memory DOSKEY requires, then this chapter will show you how to perform the same tasks without DOSKEY using batch files.
Chapter 7 Making DOS Run Smoother. This chapter will show you how you can use batch files to run inflexible programs, make sure a second program is not loaded while shelled out from another program and other tasks you can perform with batch files to make DOS easier to use.
Chapter 8 Working With Subdirectories. Normally, batch files are fairly ignorant of subdirectories. Once a batch file changes to a new subdirectory, it can not even automatically return to the subdirectory it just left! This chapter will show you how batch files can work more intelligently with subdirectories.
Chapter 9 DOS-Based Virus Protection. While users in high risk situations will still need an antiviral package, low-risk users may find all the protection they need using DOS batch files!
Chapter 10 Miscellaneous Batch Files. This chapter presents some batch files that are useful but did not easily fit into one of the other chapters.
Section IV: Configuring DOS. Wouldn't it be nice if you could just turn your computer on and it was ready to run? With issues like networks, expanded and extended memory and memory resident software, very few users can work with just one configuration. This section will show you how to work with multiple configurations and how to change many other aspects of how DOS operates. The chapters in this section are:
Chapter 11 Booting With Custom Configurations. If you need to boot your computer with different sets of CONFIG.SYS and AUTOEXEC.BAT configuration files for different purposes, then this chapter is for you. It will show you how to automate the process and even how to have the batch file that start applications make sure the proper environment is in place prior to starting an application.
Chapter 12 Accessing Global Information. This chapter will show you how to access global information such as the volume label, time and disk serial number in batch files.
Chapter 13 Working With Your Path. This chapter will show you how to easily modify your path, including batch files that allow you to quickly swap paths and remove subdirectories from an existing path.
Chapter 14 Modifying DOS Without DOS 5.0. Even if you have not upgraded to DOS 5.0, you can change the way internal DOS commands work and this chapter shows you how. It also shows you how to change the name DOS uses for the configuration files.
Chapter 15 Modifying DOS With DOS 5.0. The DOS 5.0 DOSKEY program makes it a snap to change the operation of any of the DOS internal commands. This chapter shows you how.
Section V: The Environment. This section shows you how to take advantage of the environment provided by DOS. The chapters in this section are:
Chapter 16 Expanding The Environment. The default size of the environment is paltry. This chapter shows you how to expand it.
Chapter 17 The DOS Errorlevel. Some programs use the errorlevel to communicate rather than the environment. This chapter shows you how to use the errorlevel.
Chapter 18 Working With ANSI. Loading ANSI.SYS in your CONFIG.SYS file gives you the power to modify the screen environment your batch files work with. This chapter shows you how.
Section VI: Advanced Batch File Techniques. Many of the batch files in this book rely on advanced batch file techniques you may not have had a chance to master. This section summarizes those techniques in one quick reference for easy study.
Section VII: Documentation. This section documents the batch files and programs that comes with this book. The chapters in this section are:
Chapter 20 Batch File Documentation. This chapter provides a quick-reference explanation of each of the batch files that comes with this book. It quickly tells you what the batch file expects as an input and what the batch file does.
Chapter 21 Software Documentation. The disk that comes with this book includes three programs, Batcmd, LHA and BatScreen. Some of the batch files use the Batcmd utility to perform tasks that can not be performed with a DOS command or that are easier to perform with Batcmd. One of the batch files (SMALLBAT.BAT) uses LHA to compress several batch files into one file. I've also used LHA to compress the files on the enclosed disk. While none of the batch files uses BatScreen, it's a very nice program for producing batch file screens and could be used to easily replace many of the echo commands in these batch files. This chapter documents these three programs.
The information for this book was taken from the last draft I submitted to the publisher. Since the publisher performed minor editing, the version you purchase in the store will be slightly different.
Order One Of These Books
. Amazon.com is an on-line bookstore with a very large list of books, including all of mine that are still in print. This link will take you to Amazon.com using a special page they set up to showcase all my books. They are the easiest way I know of to order my books on-line. Of course, you can use this page to order any of the books they carry.
© 2002 by Ronny Richardson, All Rights Reserved