Batch programming for dummies.

A batch programming tutorial made by Nathan Ulbrich

So you want to learn batch?

Batch is a very basic language that is available in every windows machine. It uses a basic DOS interface, and basic commands, such as goto, echo, @, if, etc. In this tutorial you will learn the very basics of batch.

How to start your very first batch file.

If you make a user friendly program for batch, or just want to mess around, your first line should be @echo off. @echo off makes it to where your text will only show up if you type echo before the command/text. Echo is the first command you should know to start batch programming. Here is an example you can use to see what it does. Copy the following onto a .txt document, and save it as [File name here].bat (Without brackets of course.) Then simply open it, and see it for yourself:

@echo off

echo Hello world!

pause

------------------------------------------------------------------------------------------------------------------------------------

The next command you should know is pause. Putting pause after a line causes the user to have to press a key to continue, or terminate the file. It makes text easier to read as well. If you don't put pause after lines, then it will be merged together, which isn't always a problem. The only commands you need to make a very basic file are: echo, @, and pause. Using these commands will allow text to show up on screen. If you look more into batch, you can learn to create cool and advanced things! If you want a more in-depth tutorial, follow the link below:

http://www.pcstats.com/articleview.cfm?articleID=1767