批处理命令
一个批处理文件只不过是一些DOS命令的组合。它是执行一系列常用命令非常有用的方法。
In addition to the standard DOS commands,your batch file can in clude a set of special commands that let you write simple programs with replaceable parameters. When you start the batch file,a replaceable parameter,an integer between 0 and 9 preceded by a % symbol,is replaced by arguments you type in the command line. One of the most commonly used batch files is the AUTOEXEC.BAT file which DOS executes whenever you start up or reboot your system. This file lets you do such things as enter the current dat,set the command path and the system prompt and load a program,without requiring you to type each command separately. AUTOEXEC.BAT must be located in the root directory of the disk from which you boot DOS.
除了标准的DOS命令之外,批处理文件可以包括一系列特殊的命令,这些命令允许你用一些可替换的参数编写简单程序。启动批处理文件后,可替换参数,也就是0到9之间的一个整数前面加上一个%符号,将被你在命令行键入的自变量所置换。其中最普遍使用的批处理文件是AUTOEXEC.BAT文件,无论什么时候启动或重启动系统,DOS都将自动执行它。此文件允许你做如下事情:输入当前日期、设置命令路径与系统提示符及装载程序,而不需分别键入每个命令。AUTOEXEC.BAT文件必须位于启动DOS盘的根目录下。
All batch files must have the extension.BAT although the extension need not be typed on the command line when you run the file. To execute a batch file,simply type its name at the system prompt. DOS then sequentially performs the commands the batch file contains.
所有批处理文件必须以.BAT作为扩展名,不过当你运行该文件时并不需要在命令行键入扩展名。要执行批处理文件,只需简单地在系统提示符下键入其文件名即可,DOS将按顺序执行批处理文件所包含的命令。