Setup Menus in Admin Panel

How to create a batch file / script?

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 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 🙂



November 18, 2012

0 responses on "How to create a batch file / script?"

Leave a Message

Your email address will not be published. Required fields are marked *

About AIK IT Support

Start Building Your Career with Solid Platform and its the time to Grab the Opportunity and Start Today

© AIK IT Support All rights reserved.