HOME

How to Create a Batch File in Windows 10 – 100% Working

Hello friends, Today I will tell you a method on how to create a Batch file in Windows 10. We have shared a step by guide to create any DOS Batch files on Windows PC/Laptop. Users can create file in format like .cmd, .bat, .btm. In just 5 easy steps you can have your Batch file in Windows 10.

What are the Batch Files in Windows PC/Laptop?

Basically, a batch file is a medium between you and CMD. Let us have a rough idea about CMD. Windows has a command line interpreter that is called Command Prompt. It takes the input from the user and processes them. A batch file (.bat, .cmd, .btm) is a file that consists of commands that are readable for the command prompt. When a user runs a batch file, then the code written in it is executed with the help of command line interpreter that is Command prompt. The set of command is called the batch script. A batch file can be made by machine automatically or by humans manually. You can also enable copy paste in command prompt.


How to Create a Ping Test Batch file in Windows 10

A ping test batch file is a file that is used to test the pinging of an IP address. This IP address can be of any server, website, etc. This ping test is done by a simple CMD ping command that is an external command of the Command Prompt. Ping command is used to send or receive the echo request from the server which is also known as Internet Control Message Protocol (ICMP). There is a quick way to create a ping test batch file in Windows 10 PC/laptop.

  1. Open the Notepad editor on your Windows 10 PC or laptop.
  2. Now, copy and paste the command: ping ipaddress >> C:\(path to the file) on the editor.
  3. Change the path of the file in place of within brackets C:\(path to the file).
  4. This command will ping to the targeted IP address and will save the result at your given path.
  5. Lastly, save it as the desired name with a .bat file format. For example; pingfile.bat

How to Create a Menu Selection Batch file in Windows 10

With the help of batch file functionality, we can create a simple menu selection batch file in our Windows 10 PC or laptop. What menu selection batch files are is that they contain a short menu of a list of different programs. There is a simple command offered by the command prompt which is a pre-built terminal of Windows operating system. If you want to create your menu selection batch file, then this is the perfect place for you my friend. Make sure you run system file checker to repair corrupted files.

  1. Open the simple Notepad editor on your Windows 10 PC/laptop.
  2. Simply, copy and paste the below shown command.
    @echo off
    title Multiple Choice Menu
    :home
    cls
    echo.
    echo Select a task:
    echo =============
    echo.
    echo 1) Open www.mintywhite.com
    echo 2) List Temp-files
    echo 3) Run IpConfig.exe
    echo 4) Run CleanUp.Bat
    echo 5) Exit
    echo.
    set /p web=Type option:
    if “%web%”==”1” start www.mintywhite.com
    if “%web%”==”2” goto list
    if “%web%”==”3” start ipconfig.exe
    if “%web%”==”4” Call cleanup.bat
    if “%web%”==”5” exit
    goto home
    :list
    echo Listing files from c:\windows\temp
    dir c:\windows\temp /p /b
    Pause
    goto home
  3. Now, save the file as a .bat file for example, menu.bat file.
  4. That’s it. Your menu has been successfully created and will run smoothly.

How to Create a Batch File in Windows 10 – 100% Working

We have seen that what are batch files and what does it do even how does it work in the Windows operating system as well. This section will explain to you how to create a batch file in Windows 10. If you are running a Windows 10 Pc or Laptop, then you can use this guide to learn how to create a batch file in Windows 10. However, this method is an official method to run a batch file in Windows 10. However, if you are using another Windows operating system version such as 8, 8.1, 7 or even XP or 98, then you can use the same method to know that how to create a batch file in Windows 10. Without taking more time to let’s start the guide. Also, find Mac address on Windows 10.

  1. Go to the Start Menu on your Windows 10 PC/Laptop.
  2. Now, type notepad and search for it. Then, select it from the results.
  3. Once the Notepad application has been opened then copy and paste the code into it.
    echo off
    title My Test Batch File
    :: See the title at the top. And this comment will not appear in the command prompt.
    echo Test file executed.
    echo I am too lazy to write commands again and again.
    pause
  4. Now, save it as the yourwishedname.bat file.
  5. After that, simply double click on it and you will see the code has been executed and the message has been displayed on the cmd.

Last Words on How to Create a Batch File in Windows 10 – 100% Working

In this manner, you can easily learn how to create a batch file in Windows 10. In this article, I have given my code to you guys which is very simple and easy it will only display a message on your command prompt screen. You can use more codes to make your batch file exciting and multifunctional. However, if you don’t want to code your batch file then you can download templates from the interest they are free to download and use as well. The saving and execution method has been explained to you so you can now use any batch file on your Windows 10 PC/Laptop. Share this with your relatives and friends so that they can also learn about how to create a batch file in Windows 10.

Was this article helpful?
YesNo

This post was last modified on February 6, 2019 00:10

Ekaant Puri

I love to write about the latest technology. My work is to write on HowTo, Top 10 and tech solving topics.

Recent Posts

Advantages of using Themify Themes

Are you creating a website and trying to find an easy-to-use solution to give it…

2 weeks ago

Top 10 Best Plex Alternatives – Must Check Now

I have shared the 10 best Plex alternatives. You can use this Plex alternative to…

9 months ago

What is Cardioid and Supercardioid Microphone – Complete Detail

What are super-cardioid microphones? Have you ever got confused between a microphone and a super-cardioid…

9 months ago

What is a Gaming Chair – Top 8 Features

I  have shared the complete details on what is Gaming Chair. Also, check all the…

9 months ago

Top 2 Video Doorbells Without Subscription – Premium Features for Free

I have shared the 2 best Video Doorbells without subscription. You don't need to pay…

11 months ago

How to Set up a Plex Server – Create Own Server To Watch Movies, TV

You can easily Set up a Plex Server on your Windows PC/Laptop by following this…

11 months ago

This website uses cookies.