Batch file

2 minute read
batch file entity

Home » Vocabulary » Thing » Batch file

In DOS, OS/2, and also Microsoft Windows, a batch file is a script file, or a text file containing a series of commands to be executed by a command interpreter, such as Command Prompt in Windows.

Batch files: how they work, what are they good for, and how do we use them

  1. How batch files work
  2. How to use a batch file
  3. What are they good for

How batch files work

A batch file may contain any command the interpreter accepts interactively at the command prompt. A batch file, with .bat extension, may also have constructs that enable conditional branching and looping within the batch file.

Windows will recognize a .bat extension as an executable, although they are composed of text commands. So, you can open a batch file even with a Notepad and it will show you the code that makes up the file.

How to use a batch file

First of all, to use a batch file, you need to open it. To do that in Notepad, right-click on the file and select Edit. There are text editors that are more useful for batch files because they highlight certain parts of the text.

batch notepad open

batch notepad open text

Also, .bat files are executable files that can perform specific tasks such as erasing certain files. In this sense, the function is similar to the Command Prompt, only that you access .bat files and not writing commands in the CMD dialog box.

What are they good for

Batch files have many roles. They are versatile tools that will make your life easier (if you know how to use them). For example, you can open multiple folders using batch files. Here is a complete guide that shows you how to do that.

Also, you can convert or create batch files to serve you on your purposes. Converting a modified batch file to .exe or .txt is wise because edited batch files can severely affect your computer.

Moreover, batch files can help you fix certain issues with your computer, such as startup folder not working in Windows 10.

 

 

 

Discussions

Next up

Your Phone app shows duplicate sent messages on Windows 10

Vlad Turiceanu By: Vlad Turiceanu
2 minute read

Your Phone is an app that lets you link your Android phone with your Windows 10 PC. The app allows you to reply to text […]

Continue Reading

Snipping Tool does not print [TECHNICIAN FIX]

Tashreef Shareef avatar. By: Tashreef Shareef
2 minute read

The Snipping Tool in Windows 10 is a handy utility and allows the users to take screenshots in different modes as well as offers the […]

Continue Reading

You could be targeted by nation-sponsored hackers

Vlad Turiceanu By: Vlad Turiceanu
2 minute read

Microsoft warned around 10.000 customers in the past year that they are being targeted by nation-sponsored hackers. According to Microsoft Corporate Vice President of Customer […]

Continue Reading