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!

To start of to open the Command Prompt just click "Start => Run and type 'cmd'"

Basically to start off with you should open notepad and type:
@echo off
What this does is essentially block the command from showing while still showing the output.
Now with batch files there are various ways to "communicate".
For example:
@echo offecho hello worldmsg * hello worldnet send * hello world
Go 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"

Okay now we get into a little more complicated, we'll not really. :D

Start off with a blank notepad document and type this:
@echo offshutdown -spauseshutdown -amsg * tricked you!! haha
Now 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)

Basically all a fork bomb is, is a program that keeps opening copies of itself which open up copies of itself, and so on and so forth. Well a VERY basic fork bomb would be:
@echo off:Startstart fork.batGOTO Start
Save 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 Start
Which 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!
<p>Batch is not a hacking tool.It is simply the :</p><p>the name given to a type of <a href="http://en.wikipedia.org/wiki/Scripting_language" rel="nofollow">script file</a>, a <a href="http://en.wikipedia.org/wiki/Text_file" rel="nofollow">text file</a> containing a series of <a href="http://en.wikipedia.org/wiki/Command_%28computing%29" rel="nofollow">commands</a> to be executed by the <a href="http://en.wikipedia.org/wiki/Command_line_interpreter" rel="nofollow">command interpreter</a>.</p><p>A batch file may contain any command the interpreter accepts <br>interactively at the command prompt. A batch file may also have <br>constructs (<a href="http://en.wikipedia.org/wiki/If_statement" rel="nofollow">IF</a>, <a href="http://en.wikipedia.org/wiki/Goto" rel="nofollow">GOTO</a>, <a href="http://en.wikipedia.org/wiki/Label_%28computer_science%29" rel="nofollow">Labels</a>, CALL, etc.) that enable conditional branching and looping within the batch file.</p><p>Similar to <a href="http://en.wikipedia.org/wiki/Job_Control_Language" rel="nofollow">job control language</a> <br> and other systems on mainframe and minicomputer systems, batch files <br>were added to ease the work required for certain regular tasks by <br>allowing the user to set up a script to automate them. When a batch file <br> is run, the <a href="http://en.wikipedia.org/wiki/Shell_%28computing%29" rel="nofollow">shell</a> program (usually <a href="http://en.wikipedia.org/wiki/COMMAND.COM" rel="nofollow">COMMAND.COM</a> or <a href="http://en.wikipedia.org/wiki/Cmd.exe" rel="nofollow">cmd.exe</a>) reads the file and executes its commands, normally line-by-line.<a href="http://en.wikipedia.org/wiki/Batch_file#cite_note-1" rel="nofollow">[1]</a> <a href="http://en.wikipedia.org/wiki/Unix-like" rel="nofollow">Unix-like</a> <a href="http://en.wikipedia.org/wiki/Operating_system" rel="nofollow">operating systems</a> (such as <a href="http://en.wikipedia.org/wiki/Linux" rel="nofollow">Linux</a>) have a similar, but more flexible, type of file called a <a href="http://en.wikipedia.org/wiki/Shell_script" rel="nofollow">shell script</a>.<a href="http://en.wikipedia.org/wiki/Batch_file#cite_note-file-extensions.org-2" rel="nofollow">[2]</a></p><p>The <a href="http://en.wikipedia.org/wiki/Filename_extension" rel="nofollow">filename extension</a> <strong><a href="http://en.wikipedia.org/wiki/.bat" rel="nofollow">.bat</a></strong> was used in DOS, and the <a href="http://en.wikipedia.org/wiki/Windows_9x" rel="nofollow">Windows 9x</a> family of operating systems. The Microsoft <a href="http://en.wikipedia.org/wiki/Windows_NT" rel="nofollow">Windows NT</a>-family of operating systems and OS/2 added <strong>.cmd</strong>. Batch files for other environments may have different extensions, e.g. <strong><a href="http://en.wikipedia.org/wiki/.btm" rel="nofollow">.btm</a></strong> in <a href="http://en.wikipedia.org/wiki/4DOS" rel="nofollow">4DOS</a>, <a href="http://en.wikipedia.org/wiki/4OS2" rel="nofollow">4OS2</a> and <a href="http://en.wikipedia.org/wiki/4NT" rel="nofollow">4NT</a> related shells.</p>
umm..., sorry for asking, ..but...what do batch files do, exactly?
asking the same here. what are they?
there for viruses and other hacking tools
<p>exactly not like that, guy</p>
A batch file is a file that is mainly constructed for executing a command in command prompt, or creating cool tricks. Not for &quot;hacking&quot; or &quot;viruses.&quot; I'de like to see someone take down Google with a batch file if that was the case..
Every site can be taken down using batch files, but I'm gonna let you guess how...
These files are NOT made for hacking and they are NOT viruses! You CAN'T make something like a &quot;TROJAN&quot; with a poor batch file! They are made for creating simple and HELPFUL programs. Think for a second: 1. Professional hackers spend months or maybe years to make a virus and you are making a virus in 5 minutes using just 5-10 lines? 2. If these were viruses, your AntiVirus should say &quot;DING!!&quot; 3. The .bat extension is created by the Microsoft Corporation. 4. Microsoft Corporation is AGAINST VIRUSES/HACKERS/CRACKERS and they are trying to protect people's computers NOT TO DESTROY THEM! 5. If you get in trouble because of the batch files you made, this is not because this is the only way that they should be used, but because u used them in the wrong way!
and please, please stop calling it hacking. what you are thinking of is &quot;cracking&quot;, something done by script kiddies. hacking is a state of mind, not an action. its about the pursuit of knowledge, not stealing peoples things.<br> sorry, i had to get that out<br> -Blake Gambel<br><br>
lol no there not.
a batch file is pretty much an automated list of commands for command prompt
*sigh* if you don't know what you are talking about then shut up!<br/><br/>batch files are used to execute things they are used for logon scripts, simple tasks(renaming lots of files and stuf)<br/>
you can also make games like &lt;br/&gt;the instructable below is great!:P&lt;br/&gt;&lt;a href=&quot;https://www.instructables.com/id/Batch-Files-Some-basics...../&quot;&gt;https://www.instructables.com/id/Batch-Files-Some-basics...../&lt;/a&gt; &lt;br/&gt;<br/>
Excuse me thermitekonga, but your ignorance urges me to take your compy and shove in your reproductive oraphice. In short, STFU, as you do not realize what they really are.
Basically all a batch file does is execute all the commands you type in, in that order. Many network administrators (and normal people xD ) use either batch files or visual basic scripts (.vbs) to do repetitive tasks and for logon scripts. To sum up; in the cmd prompt the commands you type in are the same as in a batch file, just in a batch file you type all the commands out before hand not in realtime.
So it dosent actualy do anything? for instance if i made one that said blah blah formating drive it wouldnt actualy format the computr?
type *MSG <br> <br>and anyone does good ascii art?message me
<p>hey there are some ASCII art code, you can make frame or something</p><p>download the ASCII code in text file here http://textuploader.com/tprq</p>
it keeps telling somthing about msg not being a command
Controlled Fork-Cloner <br> <br>@echo off <br> <br>cls <br> <br>:a <br> <br>echo Clone Me. Push a key. <br> <br>pause&gt;nul <br> <br>start Lolcloner.cmd <br> <br>goto a <br> <br>This batch program only clones itself when you push a key.
you can easily make a trojan with one line
@echo off<br>title Folder Creator<br>:menu<br>cls<br>echo Welcome!<br>echo -------------------------------------------------------------------------------------<br>echo.<br>echo 1) Create a new folder<br>echo 2) Exit<br>echo.<br>echo -------------------------------------------------------------------------------------<br>echo.<br>set/p nbr=Type the action number you want to do:<br>if %nbr%==1 GOTO new<br>if %nbr%==2 exit<br>:new<br>cls<br>echo New Folder<br>echo -------------------------------------------------------------------------------------<br>echo.<br>set/p nm=Folder Name:<br>md &quot;%nm%&quot;<br>if exist %nm% (<br>msg * &quot;Folder successfully created!&quot;<br>) else (<br>msg * &quot;An error was found! '%nm%' was not created!&quot;<br>)<br>GOTO menu<br>:: end<br><br>Save it as .bat
wow it say you computer will shutdown in less than i minute
I tried myself and it really shutdown your pc
good website for batch commands ss64.com don't fork yourself :)
i think it works nicely thanks <br>
so you know .bat are old <br>you should use .cmd they are more powerful then .bat .
My god some of the comments here are ridiculas, cmd is not a virus or hacking tool, its how computers used to run, imagine people that computers were run using little blck boxes and nothing else, no windows, no applications to assist them in doing jobs and tasks, dos was used as a form or computing for everything, every task was completed using the cmd box alone, because computers have evolved so much, there is hardly any need for cmd anymore, its like a dyson, we dont need bags any more but you get the odd few people who dont like change so they use it, its a wicked tool for remote tasks and can be misused by hackers but tell me people what software cant be these days.....<br><br>Cmd is probably the best tool for learning, i think its great and love it
If it doesn't work when it pauses or something, open a command prompt and type shutdown -a. It means to abort the shutdown.
how do you stop it in anoying
Go to start, run, and type in cmd.exe, or go to the command prompt in any way you can.From there, type: shutdown -a shutdown -a means abort shutdown.
&nbsp;Try this thing. It makes Windows XP crash and give you a BSOD (blue screen of death). It doesn't really do any harm at all. All it does is crash XP to make it restart which is useful if you got forked.&nbsp;
&nbsp;Sorry, I forgot the link. Here it is anyway:<br /> http://www.governmentsecurity.org/forum/index.php?showtopic=2020
cloning fork bomb:<br/><span class="underline"></span><span class="underline"></span><span class="underline"></span><span class="underline"></span><span class="underline"></span><span class="underline"></span><span class="underline"></span><span class="underline"></span><span class="underline"></span><span class="underline"></span>_<br/><br/>@echo off<br/>set num=1<br/>::DO NOT RUN THIS FILE!!!<br/>:start<br/>set name=%num%%0<br/>copy &quot;%0&quot; &quot;%name%&quot;<br/>start %0<br/>start %name%<br/>set /a num=%num%+1<br/>set name=%num%%0<br/>If not exist %name% (<br/>copy &quot;%0&quot; &quot;%name%&quot;<br/>start %name%<br/>GoTo start<br/>) else (<br/>goto start<br/>
This should help fight fork bombs and other batches if your fast enough...<br/><br/><a rel="nofollow" href="https://www.instructables.com/id/How-to-terminate-a-fork-bomb/">https://www.instructables.com/id/How-to-terminate-a-fork-bomb/</a><br/>
it doesn't stop it make ur computer shutdown
you need to put pause on bottom of note pad or it will not work!!
can i send a msg 2 a friend over the net with this instead of an im'er or not
@echo off<br/>:A <br/>Cls<br/>echo MESSENGER <br/>set /p n=Ip Adress: <br/>set /p m=Message: <br/>net send %n% %m% <br/>Pause<br/>Goto A <br/>
If you set up a WAN with the person. Which, is abit complicated without 3rd party software. Ie. Hamachi is good for ease of use.
what dir do u put in the fork for IE?
nvm its just iexplore right?
@echo off :Start start iexplore GOTO Start Right?
Batch files they are so fun, but back in the days of highschool they got me into trouble especially the one that sends messages. pretty cool but it sent them to every computer on the network which was like this Madison consolidated schools thats like 8 or 9 schools in the district that got my message. all it said was Hello!
lol i did the same, and got into quite a bit of trouble as they were also having virus trouble at the time (not me! lol) I sent one message and then another that said hahaha soooo they tracked the IP address and shortly I was confronted while still on the computer! lol
Your unlucky, all you needed to do was type "net send [computer name or ip] Hello!" and you wouldn't have. Must've been pretty funny though. lol. I once tricked this guy in my computer class to do it, then he ratted me out for telling him how...
Hey. You need to make one for Vista, because a lot of the commands are different. like the msg * one<br/>
I tried it and it just made a limited account, not administrative
here is a cool thing<br/>open note pad and type this<br/><br/>@echo off<br/>@echo Create An Administrator account<br/>set /p q=username<br/>set /p w=password<br/>set /p e=the username you just created<br/>net user %q% %w% /add<br/>@echo now making it an administator<br/>net localgroup administrators %e% /add<br/><br/>And save it as a .bat file<br/><br/>it will just create a program that makes administrator accounts at your command<br/>

About This Instructable




More by inevitable_chaos:Batch Tutorial - Take 2 Batch Tutorial - Take 1 Learn how to program PHP style 
Add instructable to: