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  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,  on the drive root will be hidden along with   and. They can be viewed by enabling files with System attribute to display or using the  command or by using Microsoft Diagnostics. However,  in modern versions of Microsoft Windows is used as a dummy file for NTVDM.