.BAT File Extension
File TypeDOS Batch File
What is a BAT file?
A BAT file is a DOS batch file used to execute commands with the Windows Command Prompt (cmd.exe). It contains a series of line commands in plain text that are executed to perform various tasks, such as starting programs or running maintenance utilities within Windows.
BAT files are typically only used by computer-savvy DOS or Windows users looking to make repetitive tasks easier to complete. Users can manually create BAT files with a text editor, such as Notepad or Wordpad, and add multiple commands on separate lines that can be executed by the command-line interpreter. When saving a batch file, save it with a .bat extension or save it as a .TXT file then rename the .txt file extension as .bat.
NOTE: While BAT files may be run on modern Windows operating systems, they may be run on older Windows operating systems such as Windows 95 and 98 as well.
AUTOEXEC.BAT - The batch file run by DOS and older versions of Windows (95, 98, and Me) upon startup. It is located in the root directory of the boot drive.
Since BAT files store executable commands, the files may be used for distributing and executing malware attacks on victims' computers. To protect against malicious attacks, never double-click a BAT file you have downloaded or received via an email attachment unless you can verify the legitimacy of the source. You can open it with a text editor to inspect the commands and if you are still unsure about its safety, delete the file.