The File Extensions Database


.BAT File Extension

  • Developer by: Microsoft
  • Category: Executable Files
  • Format: Text

What is an .BAT file?

.BAT is DOS Batch 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 that typically might be entered at the DOS command prompt. BAT files are most commonly used to start programs and run maintenance utilities within Windows.

BAT files can be manually created and edited to automate tasks and perform repetitive operations. They can written with a basic text editor, such as Notepad, and saved with a ".bat" extension.

Older Windows operating systems such as Windows 95 and 98 run BAT files as well.

NOTE: Avoid opening unknown BAT files since they may contain viruses or other malicious code.

Common BAT Filenames

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.

Programs that open DOS Batch File
Windows
File Viewer Plus
Microsoft Windows Command Prompt
Microsoft Windows
Mac
Parallels Desktop for Mac with Windows installed

How to solve problems with BAT files

  • Associate the BAT file extension with the correct application. On :
    Windows: Right click on any BAT file and then click "Open with" > "Choose another app". Now select another program and check the box "Always use this app to open *.BAT files". Mac: Right click (or Ctrl-click) the BAT file, then click "Open with" > "Other...". Then choose another program and check the "Always Open With" box. Linux: Right click on the file, and select "Open with" and choose another program. iPhone: Tap the file. If you do not see an app to open the file, then tap Share "Share" and choose an app. Alternatively, save the file. Then open the Files app Files app. There long-press on the file, then release your finger. You will see a black menu bar. Then tap "Share" and select an app. Android: Tap the Settings icon on your smartphone, then tap on the Apps section. There tap the Options icon in the top right-hand corner of the screen to change the default apps.
  • Update your software that should actually open .BAT is DOS Batch File. Because only the current version supports the latest BAT file format. Search, therefore, e.g. on the Microsoft manufacturer website after an available .BAT is DOS Batch File update.
  • To make sure that your BAT file is not corrupted or virus-infected, get the file again and scan it with antivirus software.