Using an AUTOEXEC.BAT File

You may find that there are some commands you need to run every time you turn on your computer.

To run a command or a series of commands automatically upon startup, you can type the commands into a special file called AUTOEXEC.BAT. When you load MS-DOS, it automatically looks for this file. If there is an AUTOEXECBAT file in the root directory, MS-DOS executes the commands in that file.

Here are some suggestions for tasks you can perform using an AUTOEXEC.BAT file:

Ll Modify the PATH command to include the directories containing application programs you commonly use. This reduces the number of times you need to change directories or specify pathnames.

Add the command that starts your most commonly used application program (such as a word processor or spreadsheet program) so MS-DOS loads it automatically when you turn on or reset the computer.

rd Change the MS-DOS command prompt so it displays the current directory--or your name, or anything else you want.

See your MS-DOS Reference Manual for instructions on using the PATH command, the PROMPT command, and any other commands you want to include in your AUTOEXEC.BAT file.

The SELECT program you used to install MS-DOS, created an AUTOEXEC.BAT file in the root directory of your hard disk. SELECT adds commands to the AUTOEXEC.BAT file based on your responses to questions. See your MS-DOS Installation Guide for details.

Using MS-DOS With Your Computer 3-29