Stands for automatically executed batch file, the file that DOS automatically executes when a computer boots up. This is a convenient place to put commands you always want to execute at the beginning of a computing session. For example, you can set system parameters such as the date and time, and install memory-resident programs.
AUTOEXEC.BAT Commands:
The AUTOEXEC.BAT is a batch file that runs automatically
when your system is started. You can customize your system by adding commands
to this file. Below are some of the more common commands used in the AUTOEXEC.BAT
file, but any DOS command or other program could be used in the file.
Command
Function
Prompt
Sets the command prompt.
Mode
Sets the options for the monitor, keyboard, and ports.
Path
Defines the directories to use to find executable files.
Echo off
Tells DOS not to display each command as it executes.
Set
Defines variables for use by programs.
A typical AUTOEXEC.BAT file might look like this:
PATH=C:\DOS;C:\UTILITY;C:\BATCH
PROMPT $P$G
MODE LPT1=COM1
SET TEMP=C:\TEMP
C:\SMARTDRV.EXE
The PATH command in this example tells DOS to search for
files in the following order: the DOS directory, the utility directory,
and the batch directory.
The PROMPT command is set to display the current drive,
followed by the "greater-than" sign (>).
The MODE command redirects the printed output from the
usual LPT1 port to the COM1 port.
The SET command defines a variable called TEMP that will
be used to create a space for temporary files to be placed. Some applications,
such as DOS and Windows, use this type of space.
Finally, the SMARTDRV program is loaded.