Advertisement
Guides

How to Make a .Bat File

On Windows PC, a batch file is a text file that contains at least one MS-DOS command. The Windows system will identify a batch file by the extension “.bat” and run the commands in the file other than opening the file in Notepad. You can easily create a bat file in Windows you have your PC perform one or more MS-DOS commands automatically when you double click the same file. In this guide, I will show you how to make a .bat file on a Windows computer.

How to Make a .Bat File on Windows PC

Advertisement

Basically, a batch file or .bat file is a file that contains command-line code that can be executed on Windows operating system as per the registered source code. In any case, this batch file is supposed to be used to start using programs and run utilities.

Then, how to make a batch file (BAT) in Windows? In this article, I will explain how to create a batch file (.bat) in Windows, here are the methods:

  • First of all, click on Start and then type Notepad in Search.
  • Click the Notepad icon when it appears on the search results list.
  • After that type the commands that you want Windows to run when you double-click the batch file. You also have to place each order on a separate line. For instance, if you want the batch file to change the directory to “C:\Games” and run the program “game.exe”, the first line of the file should contain the “cd c:\games” command, and the second line should contain the command “game.exe”.
  • After that click on the File menu at the top of the Notepad window and select Save As.
  • Now you need to click on the drop-down menu next to Save as type and then choose All Files.
  • You can type the desired file name in the File name field, and include the “.bat” extension. For example, “game.bat” is a valid filename for a batch file.
  • Finally, click on the Save button.

And that is how you have now created a .bat file on a Windows computer. Also, do not forget to check how to fix inaccessible boot device error, and how to boot from a USB drive on Windows 10.

Advertisement
Ann Wood

Hi, tech writing is my passion. Testing gadgets, exploring new software, and playing games. I mostly spend my weekend watching anime.

Recent Posts

Best Cheapest CS2 Skins

In this guide, we'll explore the cost of skins in CS2, what determines their prices,…

1 day ago

The Evolution of UK Bookmaking from Local to Digital

The history of the UK is interconnected with the tale of bookmaking, reflecting the rich…

3 weeks ago

When is Helldivers 2 Coming to Xbox?

What are Arrowhead Game Studios plan to release Helldivers 2 on Xbox? Here are some…

2 months ago

How To Find Median in Excel?

Here is the formula on how to find Median of a dataset in Microsoft Excel.

2 months ago

FF7 Rebirth Trophy Guide: All Trophies List And Platinum (100%)

Here's the list of all the FF7 Rebirth trophies including the Platinum trophy.

2 months ago

FF7 Rebirth Demo Rewards: How To Redeem

Here's how to redeem all the demo rewards and bonuses in Final Fantasy 7 Rebirth.

2 months ago