Open BAT File

BAT is the abbreviation for 'batch file', and it basically consists of a text file that executes scripts, usually with the aim of automating tasks that require a large number of instructions (from mass renaming of files to installation of A program).

In such a way that, when resorting to a BAT file, it will be enough to write it once and we will be able to save time and avoid typographical errors.

Differences between a BAT and a PowerShell file

Indeed, its utility hardly differs from that of a PowerShell or Bash script (in the event that you use WSL/Linux), only that in the case of BAT, the one in charge of executing it will be CMD.EXE, also known as the ' Command Prompt', the last visible trace in current Windows of the old MS-DOS.

How to create and run a BAT file?

A BAT file is easy to create, since it can be done from Notepad itself, or any other simple text editor, simply by changing its extension from TXT to BAT when saving it.

We will also use this program to edit the file, because, although we must be careful to click on the file with the right button and select 'Edit', otherwise we would be directly executing the script (another way of executing it would be invoking it where Command Prompt).

Software to open and work with a BAT file

How to open BAT files

Typical BAT application file locations:

  • %1 %*
  • "%1" %*

Frequently associated Windows objects:

  • batfile

Related extensions