| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Batch Files We have reviewed a number of commands in this chapter; some are used more frequently than others are. It can be tedious and error prone to type and retype commands every time they are required, especially if the syntax is complex. To address this, batch files can be used. A batch file is a plain text file containing a list of DOS commands; executed in the order they appear in the file. To create a batch file, use a text-editing tool such as Notepad or Edit. Type the commands required into the editor in the same way they would be used at a command prompt, then save the file with a .BAT extension. This extension tells the command prompt (or DOS, under Windows 95 and 98) that the file contains commands to be processed. When creating a batch file, you may notice that both the commands within the batch file and the output of those commands are echoed to the screen. By placing the command @echo off at the top of a batch file, you can ensure that only the output of the commands is displayed.
Home - Table Of Contents - Contact Us CertiGuide to A+ (A+ 4 Real) (http://www.CertiGuide.com/apfr/) on CertiGuide.com Version 1.0 - Version Date: March 29, 2005 Adapted with permission from a work created by Tcat Houser et al. CertiGuide.com Version © Copyright 2005 Charles M. Kozierok. All Rights Reserved. Not responsible for any loss resulting from the use of this site. |