Finished Work
Open up any text editor, because batch doesn't need a compiler.
Now, I'm going to explain what each command we will use does.
-- @echo off -- Removes ""Watermarks"" in you're batch file.
-- title -- Sets the title of you're batch file.
-- echo -- Tells the batch file to ""say"" something.
-- pause -- Tells the command line to wait for the user to press any button to continue.
-------------------------------------------------------------------------------------
1.
So first to prevent this from happening
We will add the -- @echo off -- command
You don't want that ugly "C:\Users\-\Desktop>" then command name.
So the -- @echo off -- prevents that from showing.
---------------------------------------------------------------------------------------
2.
Next were going to add a title to the batch file, because if you don't you get a ugly header that says
Instead of that it will show
So now you should have
----------------------------------------------------------------------------------------
3.
Next we need the batch file to say "Hello World!" Right?
Well add the line
Save the file and so far we should have
-----------------------------------------------------------------------------------------
4.
Now if you save the file as a .bat with any name you can run it, but you notice, as soon as you open it, it closes! To prevent this we will add the -- pause -- command. If we have this command in our finished product if we open the file we get
---
This tutorial was made by me, and it isn't hard, thanks for reading. -razz-
@echo off
title Hello World!
echo Hello World!
pause
title Hello World!
echo Hello World!
pause
Open up any text editor, because batch doesn't need a compiler.
Now, I'm going to explain what each command we will use does.
-- @echo off -- Removes ""Watermarks"" in you're batch file.
-- title -- Sets the title of you're batch file.
-- echo -- Tells the batch file to ""say"" something.
-- pause -- Tells the command line to wait for the user to press any button to continue.
-------------------------------------------------------------------------------------
1.
So first to prevent this from happening
Code:
C:\Users\-\Desktop>title Hello World!
C:\Users\-\Desktop>echo Hello World!
Hello World!
C:\Users\-\Desktop>pause
Press any key to continue . . .
You don't want that ugly "C:\Users\-\Desktop>" then command name.
So the -- @echo off -- prevents that from showing.
---------------------------------------------------------------------------------------
2.
Next were going to add a title to the batch file, because if you don't you get a ugly header that says
Code:
C:\windows\system32\cmd.exe
Code:
Hello World!
Code:
@echo off
title Hello World!
3.
Next we need the batch file to say "Hello World!" Right?
Well add the line
Code:
echo Hello World!
Code:
@echo off
title Hello World!
echo Hello World!
4.
Now if you save the file as a .bat with any name you can run it, but you notice, as soon as you open it, it closes! To prevent this we will add the -- pause -- command. If we have this command in our finished product if we open the file we get
Code:
Title : Hello World!
Hello World!
---
This tutorial was made by me, and it isn't hard, thanks for reading. -razz-







