gadget-bridge
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

- Advertisement -

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 -

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.

- Advertisement -

Step 1 – Press start 

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

- Advertisement -

Step 3 – Type in the below program 

@ECHO OFF

ECHO Your first batch file was executed successfully.

PAUSE

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.

C:\Users\vipul\Desktop\First.bat

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 -

Support Us

We are a humble media site trying to survive! As you know we are not placing any article, even the feature stories behind any paywall or subscription model. Help us stay afloat, support with whatever you can!

Support us
- Advertisement -
- Advertisment -
- Advertisement -

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisement -
- Advertisement -

Follow Us

- Advertisement -

Must Read

Google Pixel 8, Pixel 8 Pro camera specs leaked ahead of the October 4 launch

Google Pixel 8, Pixel 8 Pro camera specs leaked ahead of...

0
After Apple's iPhone 15 series the next biggest launch of this year is Google Pixel 8 Series. Some of the key specifications and design...
- Advertisement -

You cannot copy content of this page