Batch script is a good and handy tool to automate your work. You can place you commands and they execute in sequence.

In Microsoft Windows, batch file is the name given to type of script file, it’s basically text file (.txt) containing the series of commands to be executed by the command interpreter. When a batch files runs the shell program usually Command.com or cmd.exe reads the file and execute it normally.

It’s easy any windows command we can put in the batch script to execute and most interestingly you can schedule it, in the Windows scheduler…

Let’s Show you how we can move forward – before that lets make you familiar with few codes which you can use in batch file.

START: this is used to start and execute any command

Echo on: This basically prints the statement for the batch file

Echo off: This code is written in the start of the file and it means that program will not show up which command is executing.

Pause:  it will pause the execution and it will continue once we press any key

CLS: Clears the DOS window

Let’s Start

Go to your Desktop and right click à go to New and select the Text Document

Now you need to rename the File as .bat

In our case we did it as test.bat and it’s also prompted a warring and asks a confirmation that do we want to continue? Just Click Yes

Right click on the file and click edit

And now place your command and save it while closing it

Now you need to right click in the file and click open – with Echo On it will print all information will be seen as you can see one command is not executed as there is spelling mistake in start 🙂

 

 

newsletter-aik

Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

You have Successfully Subscribed!