If you wanna do various tricks with computer(some call them hack), then knowledge of Batch files is important. Here, I have included "echo,pause,msg and cls"...
This is the most basic tutorial out there, on how to make Batch file with Notepad...If you need any help, just mail me or leave a comment (I'll be glad to help!)
So... moving on here it is:
Before the tutorial (Here are some basics!)
The words in ( ) are just Remarks...They won't Appear!
echo on/off :
To Start off, there is the @echo off/on
and there is echo
and there is pause
Here is an Example!
Type this in Notepad and Save as Test.bat
Launch it
Code:
@echo off
echo Hello This is a test
pause
it will look like this!
Code:
Hello This is a test
Press any key to continue...
Again open Notepad and Write:
Code:
@echo on
echo Hello This is a test
pause
Save it as test2.bat
Launch it...it will look like this!
Code:
C:\Documents and Settings\User\Desktop>echo Hello This is a test
Hello This is a test
C:\Documents and Settings\User\Desktop>pause
Press any key to continue
So therefore...
If you put @echo on it will show the directory as you just saw.
but, if you put @echo off it will just show the words with no directories...understand so far?
Basically it's best to just use @echo off
Echo:
If you want to type a simple statement just type in echo and something in this case
echo Hello This is a test
Which will show only, Hello This is a test
Pause:
Pause will pause the Batch file, so that if you Press a Key the Batch will continue in this case it will exit because there is nothing left.
So try this.
Code:
@echo off
echo Hello This is a test
pause
echo I am testing pause
pause
This will show...
Code:
Hello This is a test
Press Any Key To Continue...
(When you Press a Key it will show...)
I am testing a pause
Press Any key to continue
So that covers the "Pause" Command. Smile
msg and cls:
Now some more commands...
There is msg *
And there is cls
Open Notepad and Write:
Code:
@echo off
echo Hello This is a test
pause
cls
echo I am testing pause
msg * The End
pause
Save as test3.bat
This will show...
Code:
Hello This is a test
Press Any Key To Continue...
(when you press a key it will show)
cls
(the page will clear)
I am testing a pause
(a pop-up will show saying The End)
Press Any key to continue..
So...cls will just clear the screen
And msg * will bring up a pop-up (Simple right?)
In the next tutorial, I will include "rem,goto,set,start,if"...
So... moving on here it is:
Before the tutorial (Here are some basics!)
The words in ( ) are just Remarks...They won't Appear!
echo on/off :
To Start off, there is the @echo off/on
and there is echo
and there is pause
Here is an Example!
Type this in Notepad and Save as Test.bat
Launch it
Code:
@echo off
echo Hello This is a test
pause
it will look like this!
Code:
Hello This is a test
Press any key to continue...
Again open Notepad and Write:
Code:
@echo on
echo Hello This is a test
pause
Save it as test2.bat
Launch it...it will look like this!
Code:
C:\Documents and Settings\User\Desktop>echo Hello This is a test
Hello This is a test
C:\Documents and Settings\User\Desktop>pause
Press any key to continue
So therefore...
If you put @echo on it will show the directory as you just saw.
but, if you put @echo off it will just show the words with no directories...understand so far?
Basically it's best to just use @echo off
Echo:
If you want to type a simple statement just type in echo and something in this case
echo Hello This is a test
Which will show only, Hello This is a test
Pause:
Pause will pause the Batch file, so that if you Press a Key the Batch will continue in this case it will exit because there is nothing left.
So try this.
Code:
@echo off
echo Hello This is a test
pause
echo I am testing pause
pause
This will show...
Code:
Hello This is a test
Press Any Key To Continue...
(When you Press a Key it will show...)
I am testing a pause
Press Any key to continue
So that covers the "Pause" Command. Smile
msg and cls:
Now some more commands...
There is msg *
And there is cls
Open Notepad and Write:
Code:
@echo off
echo Hello This is a test
pause
cls
echo I am testing pause
msg * The End
pause
Save as test3.bat
This will show...
Code:
Hello This is a test
Press Any Key To Continue...
(when you press a key it will show)
cls
(the page will clear)
I am testing a pause
(a pop-up will show saying The End)
Press Any key to continue..
So...cls will just clear the screen
And msg * will bring up a pop-up (Simple right?)
In the next tutorial, I will include "rem,goto,set,start,if"...