Batch Programing Language


Batch is a simple programming language.

Batch file programming is nothing but the Windows version of Unix Shell

Programming. Let's start by understanding what happens when we give a

DOS command. DOS is basically a file called

It is this file ( which handles all DOS commands that you

give at the DOS prompt---such as COPY, DIR, DEL etc. These

commands are built in with the file. (Such commands which

are built in are called internal commands.).DOS has something called

external commands too such as FORMAT,


whenever we give a DOS command either internal or external, either straightaway executes the command (Internal

Commands) or calls an external separate program which executes the

command for it and returns the result (External Commands.)

why do I need Batch File Programs?

Say you need to execute a set

of commands over and over again to perform a routine task like Backing

up Important Files,Deleting temporary files(*.tmp, .bak , ~.* etc)

then it is very difficult to type the same set of commands over and over

again. To perform a bulk set of same commands over and over again,

Batch files are used. Batch Files are to DOS what Macros are to

Microsoft Office and are used to perform an automated predefined set

of tasks over and over again.

how do I create batch files?

To start enjoying using Batch files, you

need to learn to create Batch files. Batch files are basically plain text

files containing DOS commands. So the best editor to write your

commands in would be Notepad or the DOS Editor (EDIT) All you need

to remember is that a batch file should have the extension .BAT(dot

bat)Executing a batch file is quite simple too. For example if you create

a Batch file and save it with the filename

batch.bat then all you need to execute the batch file is to type:


So what happens when you give a Batch file to the to


Whenever comes across a batch file program, it goes into

batch mode. In the batch mode, it reads the commands from the batch

file line by line. So basically what happens is, opens the

batch file and reads the first line, then it closes the batch file. It then

executes the command and again reopens the batch file and reads the

next line from it. Batch files are treated as Internal DOS commands.

Amazing Fact About Batch Files :

While creating a batch file, one thing that you need to

keep in mind is that the filename of the batch file should not use the

same name as a DOS command. For example, if you create a batch file

by the name dir.bat and then try to execute it at the prompt, nothing

will happen.This is because when comes across a command,

it first checks to see if it is an internal command. If it is not then checks if it a .COM, .EXE or .BAT file with a matching

filename.All external DOS commands use either a .COM or a .EXE

extension, DOS never bothers to check if the batch program exits.

========= Bassic knowledge ==========

Hello Friends you are learning here Batch Programing. Here are some basic things that you should know about [ batch Programing ] .

[+] At the start of the batch program you have to type @echo off

[+] When starting every New Line you have to type echo

=========== TUITORIAL-1 ===========

Now let's move on to your first Batch file program.

always(Normally we begin with the obligatory Hello World program) first

take up a simple batch file which executes or launches a .EXE program.

Simply type the following in a blank text file and save it with a .BAT


AIM : :- In these tuitorial you learn how to give output on screen.


1] At first you have to type [ @echo off ] to off the echo_ing

function of the program .

NOTE : :- Enter any coad without brackets or wothout dot .

NOTE: :- Type [ @echo off ] without brackets or without any dot.

NOTE: :- On starting each line you have to type [ echo ] then youcan enter any text to out_put screen .

2] Ok lets give out_put like [ echo Hello world! ].

3] Now to pause the out_put screen you have to type [ pause ].

4] then save the file as [ T1.bat ] on your desktop .

output of [ T1.bat ] these program will be look like


Batch is a very basic & simple Programing Language .

1] How to make a MATRIX EFFECT in Batch Language .

=:-) (1) Open Note-Pad .

=:-) (2) Enter the fallowing Coad in it -

@echo off


color 0a

mode 10000



goto a

=:-) (3) Save the file Goto (File -> Save as) . Name the File ( Matrix.bat) , ok.


Note :- (%random%) this word should be 1 row Long .