146k views
5 votes
A file with a .bat file extension is called a batch file. You can use a batch file to execute a group of commands, sometimes called a script, from a command prompt. Do the following to learn to use a batch file?

User Aardvarkk
by
5.6k points

1 Answer

3 votes

Answer:

Create a text file. And add this code in it:

@echo off

You are welcome to the batch programming!

And now save it with .bat file type. Give it any name you want.

And to run the bat file, double click the bat file. It will be running.

You can run it from command prompt as well. Type as below:

C:\folder\batch_name.bat.

Now, we can add as many commands in the file as we want, and we can do the batch programming.

Step-by-step explanation:

Please check the answer section.

User Dapo
by
4.8k points