HomeGadget Bridge AceHow to create and run batch files on Windows 10?

How to create and run batch files on Windows 10?

Want to create and run a batch file on Windows? Here is how you can

Batch files are .bat extension files that have a special command line to perform a specific task. Once run, there is a sequence of commands that take action with the command prompt. You can either perform specific tasks or change the system setting by using a batch file. Though there is a one time hassle of typing it. To get a seamless experience one should have a grip over the command line. This article will act as a push start for interested readers.

Note – This article will only teach how to start and execute a batch file as the topic is very vast and needs some level of coding experience to master.

- Advertisement -

Table of Contents

How to create a batch file

The process is fairly easy. All you need is a text editor to start with. You must also have some basic knowledge to create and craft command prompt executables. Follow the below steps.

Step 1 – Press start 

Step 2 – Search for a notepad or use professional coding tools like Notepad ++.

Step 3 – Type in the below program 


ECHO Your first batch file was executed successfully.


Create batch file in WindowsRead Also: Top 5 ways to force uninstall programs in Windows 10

Meaning of keywords:

  • @ECHO OFF – Display the content in a clean line disabling the display prompt.
  • ECHO – Prints the text after a space on the screen.
  • PAUSE – The CMD will still be running even after the command has been successfully executed.

Step 4 – Click on File and then Save As

Step 5 – Save the extension as .bat. (Example – First.bat)

Save .bat file

How to run the batch file

Step 1 – Press Start and search command prompt (Run as administrator).

Step 2 – Now input the path of your bat file for our case the file is on the desktop so we will input the following command.


Step 3 – Press enter to execute the file

run batch file

Read Also: How to batch rename files on your Android mobile?

Another alternative is to right-click the bat file and run as administrator. It will ask the permission of the Command prompt to grant it to gain similar results. With this, we come to the end of this article. There are a lot of uses for a batch file like scheduling to perform a particular task at a particular time or enabling system setting at a particular course of action. One can also create batch file to run command. but for that, one must have a grasp over CMD commands.

For the latest gadget and tech news, and gadget reviews, follow us on TwitterFacebook and Instagram. For newest tech & gadget videos subscribe to our YouTube Channel. You can also stay up to date using the Gadget Bridge Android App. You can find the latest car and bike news here.

- Advertisement -


Please enter your comment!
Please enter your name here

- Advertisement -

Follow Us


Must Read

Now go to Google and look for a doctor who accepts your insurance: Here's how it works

Now go to Google and look for a doctor who accepts...

Google has added new tools to help you find doctors who accept your health insurance in its most recent update. Users will be able...
- Advertisement -