How to Create and Run a Batch File on Windows 10: A Step-by-Step Guide
In Windows, there are various features such as filtering, sorting, and grouping files, and they are used in cases where the user wants to manage a large number of files in the best way. Because sometimes, the user has saved many files in his rigid system, which makes it difficult for him to access the files quickly.
Therefore, one of the steps to be taken in these cases is to sort the files, which Windows provides in different ways.
Generally, Batch files are widely used to shorten the time.
In this article we want to explain How to create and run a batch file on Windows 10.
What is batch file?
A batch file, also known as a bat, is a unique type of text file with a bat extension.
To convert a complex process into a simple task, you can put several commands in a batch file, in this case, you will convert a complex process into a simple task.
Generally, the bat file is a script file in DOS, OS/2, and Microsoft Windows.
Also, as soon as you click on the file, you can execute the commands in order.
You can easily create a batch file. We offer you two ways to make a batch file you can easily do this by following the steps mentioned in the bottom part.
How to Create a .bat File in Microsoft Windows 10
The first step to creating a batch file is to make sure you have a text editor, and if you have a text editor on your system, make sure your Notepad or WordPad is ok.
And you should also make sure that you have the basic information about the port in your system.
After checking the mentioned items, you can do the following steps:
1. On your PC screen, right click on the blank
2. Select New from the menu.
3. Click on Text Document from the submenu.
4. Double click on the New Text Document to open Notepad window.
5. Type the following content into it:
@ECHO OFF
6. Click on File from menu bar.
7. Select the Save As… option.
8. Type a name into the textbox after File name (add .bat extension to it) and select a location to save the simple batch file.
9. Select the Save button to confirm.
There is also another way to open Notepad window
1. Select the Cortana search icon/box on taskbar.
2. Type notepad.
3. Click Notepad from the result.
Note: If you need to create a functional batch file or advanced Windows batch file.
You must do the following steps:
1. You should also open the Notepad window.
2. Type the corresponding content
3. Save it as a bat file.
How to Create a Bat File in MS-DOS
This method works for people who are, using 32-bit computers if they are using a 64-bit computer, you need to use the steps because this method will not work for your system.
1. Go to the Windows search box
2. Type cmd.
3. Select Command Prompt from the result to open MS-DOS prompt.
4. Type edit test.bat.
5. Press Enter.
6. A blue edit screen will appear. Type the following content into it:
@echo off
7. Find and select File.
8. Select exit from the menu.
9. Select the Yes button to save it.
10. If you want to execute the test.bat file, just go back to the MS-DOS prompt -> type test -> press Enter.
How to Run a Batch File
1. Go to the File Explorer on your Windows 10.
2. Navigate to the drive and folder that contains the Windows batch file.
3. Double click on the batch file to run it.
Run a batch file from Command Prompt
1. Open Windows search.
2. Type cmd.
3. Right click on Command Prompt.
4. Select Run as administrator.
5. Type C:\Users\folder location\filename.bat.
6. Press Enter.
Note: You can run the batch file in Windows 10 through the Task Scheduler in a scheduled way also, you can run the batch file at the time of startup through the file explorer.
Last Words
In this article, two methods were presented to create a batch file. By doing one of these two methods, you can easily create a batch file in Windows 10.
Have you used the methods mentioned in this article?
What other methods do you know to create a batch file in Windows 10?
Share your experiences and opinions.