Introduction: Fun With Batch CMD!!

In this Instructables I will teach you beginners(unless you're a pro which in case you should not waste your time on this) something about batch and simple commands that can make your time on your computer a little better than wasting it on some crappy new Halo game(no offence).

I will be explaining how to use cmd to talk, prank, scare, or even infect the computer!!(the basic kind)

There's a file for you to download(below), I made it of course for you to comment on!!(don't be hard on me, I'm not a pro...)

Step 1: Very Basic!!

When you make your own batch program, you should have Notepad opened.

on the first line, we start off with:


@echo off


or maybe:


@echo on


or maybe you don't want to put anything on the first line.(not recommended)

but the main point to this is if you want to show or hide the commands, but normally you don't want to, or else it will ruin the beauty of your work.

Step 2: Basic Codes

In this step I will show you the very easiest of codes, which are below:(things in brackets can be replaced with instructions, if two brackets have the same thing writen then they are some how linked)

:(anything1)
-this is kind of like a checkpoint for later purposes.

GOTO (anything1)
-this means go to a checkpoint specified.

echo (message)
-this displays a message in the black screen, but it is useless without a pause.

msg * (any message)
-this displays a message in a message window.

@echo off (file name)
-records the phrase in a new file.

(anything) >> (file name)
-records the phrase in a new file.

start (file name[possibly path too])
-this starts a specific program.

pause
-this is used when you want the viewer to see your messages and press any key to continue.

pause>nul
-actually I haven't figured out what this is but it let the program pause for a while.

attrib (path and file name)
-this changes the attribute of the file, you need to add +s -s +h -h +r -r before the path and file name, each of the letters mean(in order): Y system file status, N system file status, Y file is hidden, N file is hidden, Y file is read-only, N file is read-only.

del (path or path with file name)
-delete the specific file.

echo.
-makes a blank line.

Well thats all I know...

Step 3: Happy Batching!

Do what the title says...

If I got anything wrong free to speak up.

Comments

author
ZacharyF1 made it!(author)2016-11-02

can i get the actual notepad for this plz and thank you

author
Aleksander+KnoffS made it!(author)2015-12-15

Hello, im new to cmd hacking and i need some help with my question file will someone contact me please. i would be really grateful thanks

author
101lenny101 made it!(author)2009-12-12

 Nice tutorial! But I have a question... how do you post a download lnke like you did with "fake.zip"

author
Craig+Bird made it!(author)2012-11-21

you have to rename the downloaded file call it "funwithbatch.bat"

author
%7EKnexBuild%7E made it!(author)2011-08-24

try this:

@echo off
color 3
echo what is your name?
set /p input=
echo hello %input%
pause
cls
echo how are you today (good/bad)
set /p input=
if %input%==good goto good
if %input%==bad goto bad
:good
echo that is good
goto bye
:bad
echo that is bad
goto bye
:bye
echo good bye for now
pause
goto end
:end

author
Gunmaster900 made it!(author)2009-01-24

Why did you block your username out?

author
will421 made it!(author)2009-04-16

I know! He doesn`t want people to take control of his PC, if they are a hacker!

author
Doubleblades85 made it!(author)2010-03-24

You can't take control of someones computer by knowing there username -.-

author
Gunmaster900 made it!(author)2010-01-14

 Sorry for my late comment but...if there a hacker you can EASSSSSSSSSLE get there username... :| fail
try this in command prompt:
echo %username%
WOW i have your username :|

author
skrunch55 made it!(author)2008-08-26

ummm... how do you close it? please help me!!!

author
musicninja17 made it!(author)2009-04-11

Control + C should stop all currently running batch processes.

author
knex_mepalm made it!(author)2009-09-26

How do i stop a fork bomb?

author
musicninja17 made it!(author)2009-09-26

If you're lucky, hit control+alt+delete quick, and close out all the applications. Or otherwise, just restart your computer. The beauty if fork bombing is that it really doesnt destroy anything, its just a major incovenience when you have to shut down your computer XD

author
elkalpin made it!(author)2009-10-18

What about "Function + break"

author
knex_mepalm made it!(author)2009-09-30

How do you put a file on your instructables

author
knex_mepalm made it!(author)2009-09-27

hmm, i made it on a computer so it runs the fork bomb every time my documents is pressed! How do i remove it?

author
musicninja17 made it!(author)2009-09-27

You just go to wherever you put your .bat file and delete it.

author
knex_mepalm made it!(author)2009-09-28

its not bat, its like an autorun, but its in my documents! so i cant access!

author
odama666 made it!(author)2009-01-22

it should end automatically when it has no more arguments to call (instructions)

author
odama666 made it!(author)2009-01-22

oh, to end it anywhere in execution use :exit

author
rocksalt2342 made it!(author)2008-08-29

ctrl+alt+delete click applications click end task

author
knex_mepalm made it!(author)2009-09-30

How do you put a file on your instructables?

author
will421 made it!(author)2009-06-08

pause>nul or command>nul hides the output.

author
LoCalHaCkEr made it!(author)2009-06-08

LUCKEY!

author
PKTraceur made it!(author)2009-02-04

THANK YOU! Just what I was looking for, basic .vbs files. (Ctrl+C+V to all the icons on desktop.) Cab you give an example of a start(Filename) ?

author
jbv6 made it!(author)2008-12-25

Hay! That was pretty good, but I like my fake virus better.

author
Gunmaster900 made it!(author)2009-01-24

well then why don't you go ahead :P some more commands for you :P (i will inclund his):

@echo off = turns command off (Type this at the top of your program)

@echo on = turns command on

dir = scans all folders and files in the curront folder (no harm)

dir/s = scans all folders and files in the computer (no harm but looks like a virus is installing)

set value=magic = when i type %value% the computer will think i just typed magic (does not have to be value and magic)

set /p value= = the user types something and the computer will make %value% to become what the user typed

set /a value=%value%-1 = say value was 10. i am typing 10-1 but thats going to be the value so with the /a it makes it think its 9

if %value%==55 goto :55 = this will see if %value% is equal to 55 if it is it goes to :55 if not it carrys on from where it was

if not %value%==55 goto :55 = This will see if %value% is not equal to 55 and if it is equal then it carrys on if its not equal then it gots to :55

echo (texthere) = says (texthere)

echo (texthere)>>(filehere).txt = will put (texthere) in to a file called (filehere) and it will be a text documant

cls = clear screen

cd (folder) = goes to the folder

md (folder) = makes a folder called (folder)

start (program here) = start a program

for /l %%n In (1,1,(timeshere)) DO (command here)

%0 = itsself

pause = pause saying "press any key to continue"

pause >nul = pause and say nothing

(command) >nul = does not show that command to the user

:(name) = makes a lable called (name)

goto :(name) = goes to the label called (name)

About This Instructable

62,480views

15favorites

More by ggkiller:Fun With Batch CMD!!
Add instructable to: