Batch file is the file, which contains the collection command which should to be executed by command prompt. Batch file make user life more easier.
If user will click on batch file all the set of dos command statement will be executed. Batch file is also know as .bat extension file.
How to create the batch file ?
We can create the simple batch like this steps
Step 1 : Open the notepad file
Step 2 : Type this code in batch file
@echo off echo Hello this a test batch file pause dir c:\windows pause
Note: Here echo is used to display the message in Dos prompt and pause is used to hold the screen
Step 3: Save the file as .bat extension like this
Step 4: Double click on Test.bat file, you will get the output like given below
In the above sample we saw that without writing the code in command prompt we can execute some set of command.