(Batch) Hello world - Your first Batch program - Printable Version +- howtothings.co.uk (https://www.howtothings.co.uk) +-- Forum: Computing (https://www.howtothings.co.uk/forumdisplay.php?fid=4) +--- Forum: Programming Support, Graphic Design and Tutorials (https://www.howtothings.co.uk/forumdisplay.php?fid=14) +--- Thread: (Batch) Hello world - Your first Batch program (/showthread.php?tid=5) |
(Batch) Hello world - Your first Batch program - Mark - 22-05-2010 How to make a Hello World script in batch. STEP ONE: Open up notepad, if you dont know where notepad is you can open it via run (Win+R) and typing notepad.exe STEP TWO: The first thing we type is " @echo off " this simply hides the current directory location of where the file is being run from. The next thing we type is the writing that you'll see, this can be anything but for this we are using " Hello World ", so you'll type " @echo Hello World ". STEP THREE: You may have noticed a problem when you open the file, a black box appears but then closes straight away. This can be fixed by typing " pause " at the end of the file. STEP FOUR: When opened, our finished file should look the same as below. STEP FIVE: - Saving the file Go to File > Save As... File name: anything.bat Save as type: All Files Encoding: ANSI I hope this has helped. |