22-05-2010, 10:35 PM
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.
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.