8.1 Batch File Concept

The term ``batch'' file is a misnomer. Essentially, a ``batch'' file is a text file that contains a number of commands, some of which you can manually type in the CLI. ``Batch file'' is a misnomer because the term ``batch'' often implies the lack of user interaction. In reality, a batch file can have basic text-mode user interaction. A more proper term is CLI scripts, or shell scripts.

In the simplest case, you can use notepad and just enter a sequence of CLI commands as if you would in a CLI. The only requirement, however, is that the file must have an extension of bat (for batch). In fact, you can do the following right now:

Although this batch file does not do anything useful, it is a good illustration of how easy it is to write a ``program'' using CLI commands.

Copyright © 2005-12-10 by Tak Auyeung