--- title: ".bat file — what it is and how to open it" description: "A .bat file is a Windows Batch File. A plain-text list of Command Prompt commands that runs when you double-click it. How to open one on Windows, macOS and Linux, and what to convert it to." url: https://atoneplace.net/file/bat/ site: "At One Place" --- # .bat files **.bat file: Windows Batch File** A plain-text list of Command Prompt commands that runs when you double-click it. ## What opens a .bat file - **Windows:** Command Prompt (built in — double-click runs it), Notepad (built in — to read it first), Visual Studio Code - **macOS:** Any text editor (to read — will not run) - **Linux:** Any text editor (to read), Wine (to run) ## What a .bat file is A .bat file is a script for the Windows command interpreter, dating back to DOS. It is readable text, so always open a downloaded one in Notepad and read it before running — double-clicking executes every line immediately with your privileges. Right-click and choose Edit to inspect; the newer .cmd extension behaves almost identically. ## Converting it A .bat file is commonly converted to .cmd, .ps1, .exe or .txt. It is a plain text format, so any text editor can open and edit it directly. ## Details - **Extension:** .bat - **Full name:** Windows Batch File - **Category:** Programs and installers - **Created by:** Microsoft - **Format:** Plain text ## Common questions ### How do I open a .bat file? On Windows use Command Prompt (built in — double-click runs it); on macOS use Any text editor (to read — will not run); on Linux use Any text editor (to read). A plain-text list of Command Prompt commands that runs when you double-click it. ### What is a .bat file? Windows Batch File. A .bat file is a script for the Windows command interpreter, dating back to DOS. It is readable text, so always open a downloaded one in Notepad and read it before running — double-clicking executes every line immediately with your privileges. ### Can I convert a .bat file? Yes. It is usually converted to .cmd, .ps1, .exe or .txt, either by exporting from one of the programs listed above or with a format converter. ## Related pages - [.exe — Windows Executable](https://atoneplace.net/file/exe/) - [.apk — Android Application Package](https://atoneplace.net/file/apk/) - [.msi — Windows Installer Package](https://atoneplace.net/file/msi/) - [.dll — Dynamic Link Library](https://atoneplace.net/file/dll/) - [.sh — Shell Script](https://atoneplace.net/file/sh/) - [.deb — Debian Software Package](https://atoneplace.net/file/deb/) - [.jar — Java Archive](https://atoneplace.net/file/jar/) - [.pkg — macOS Installer Package](https://atoneplace.net/file/pkg/) - [.ps1 — PowerShell Script](https://atoneplace.net/file/ps1/) - [.ipa — iOS Application Archive](https://atoneplace.net/file/ipa/) - [.rpm — RPM Package](https://atoneplace.net/file/rpm/) - [.appimage — AppImage Portable Application](https://atoneplace.net/file/appimage/) ## Sources - Media Types Registry — IANA (https://www.iana.org/assignments/media-types/) - Official vendor product documentation — At One Place (/about/)