AUTOEXEC.BAT is an automatic batch file used for startup in MS-DOS and older versions of Microsoft Windows. It contains commands that are to be executed by the operating system when the system first boots into DOS or Windows.
It was introduced in MS-DOS 1 and can be used in all versions of MS-DOS. MS-DOS 8.00 only parses environment variables as part of its attempts to reduce legacy dependencies. If
AUTOEXEC.BAT is not present, most versions of MS-DOS will ask for date and time instead of executing startup commands.
In modern versions of Microsoft Windows,
AUTOEXEC.BAT on the drive root will be hidden along with
CONFIG.SYS. They can be viewed by enabling files with System attribute to display or using the
DIR /A:S command. However,
AUTOEXEC.BAT in modern versions of Microsoft Windows is used as a dummy file for NTVDM.