Introduction: Batch Tutorial - Take 1
Well i have seen a few batch tutorials out there, but none of them really follow up with anything so I'm making a 3 part tutorial on batch, with videos just for that extra ease.
I will attach all .bat (batch) files needed in their appropriate
Step 1: Hello World!
Basically to start off with you should open notepad and type:
@echo offWhat this does is essentially block the command from showing while still showing the output.
Now with batch files there are various ways to "communicate".
@echo offecho hello worldmsg * hello worldnet send * hello worldGo ahead and write that into notepad and save it as com.bat. Then double click to start.
We will be using all of them except echo as it is pretty self-explanatory.
Step 2: A Little More "tricky"
Start off with a blank notepad document and type this:
@echo offshutdown -spauseshutdown -amsg * tricked you!! hahaNow shutdown basically just shutdowns the computer. Look at the video for a more in detail look or type shutdown -? into cmd.
pause basically waits for you to press ANY KEY to continue.
And you know what msg does from the previous step..
Try this out by saving it as tricky.bat.
Step 3: Fork Bombs / Infinite Loop (the GOTO Trap)
@echo off:Startstart fork.batGOTO StartSave as fork.bat
:Start marks a place in the script to which you may want to GOTO later or quicker then planned.
GOTO tells the program to go to a specific part
start basically "starts" something it can be a webpage, anything.
eg, start http://instructables.com''
This GOTO trap last forever until the user either breaks the process of the computer crashes.
The start fork.bat can be replaced with any command you like, for example;
@echo off:Startnet send * laconix rules!GOTO StartWhich basically send the text "laconix rules!" to anyone on your network with the Messenger Service running.
Step 4: Have Fun...
Hope your eager for the next tutorial, i know i am!
Go an hone you newly learnt skill and have phun!