Introduction: FUNNY BATCH PRANK

Picture of FUNNY BATCH PRANK

In this instructable I will show you how to make an batch file that adds more than 300000 text documents on your dekstop or wherever you save it.

Step 1: OPEN NOTEPAD

Picture of OPEN NOTEPAD

You first have to open notepad

Step 2: THE CODE

Picture of THE CODE

Feel free to copy and paste the code into your new notepad document

@echo off

:start

echo HI >>%random%.txt

goto start

Step 3: SAVE THE CODE

Click on Save as and save it as whatever you want but put .bat after it that is needed or it wont work!!!

Step 4: RUN THE CODE AND THIS IS WHAT HAPPENS:

Picture of RUN THE CODE AND THIS IS WHAT HAPPENS:

It makes an unlimited amount of random folders with the text hi in it.(unless you change the hi in the code for something else.)

Comments

WildOne1985 (author)2015-04-28

"It makes an unlimited amount of random folders"
* text documents.

Unlimited - max 32767 to be precise. That is; IF it doesn't stop due to file already exist (unsure if it will do so; haven't tried).

Still - annoying prank, but easily fixed. Here is how:

@echo off
del *.txt

The above codes are simply written in notepad and saved with the *.bat extension. Make sure you put it in the correct folder and that you DO NOT have any important *.txt files in that folder (they will be deleted without any warning when program is run).


To author of instructable - best bat prank I've seen so far. Poor soul if anyone tries to manually delete all those on their desktop and they have the auto arrange turned on.

CoenW1 (author)WildOne19852015-04-28

If you really like it please vote it for the code contest!

WildOne1985 (author)CoenW12015-04-28

You need a little more to impress me ;) If you, like me, do enjoy batch then give Visual Studio a try - it's fun (I recently made my first small program)!

Another note on this instructable - I would suggest using >> instead for two reasons:
1) If a file exists then it it will simply add another "Hi" in it - like so:
Hi
Hi

and no error message will ever be displayed.

2) If the user already have a file called, say, "1337.txt" then instead of overwriting whatever (important?) notes someone may have have inside it it will rather just add another "Hi" at an own line in the end of the file.

CoenW1 (author)WildOne19852015-04-28

Thanks man!

About This Instructable

2,493views

6favorites

License:

More by CoenW1:Hacking websites with sqlmap and kali linuxHack a computer on your network with kali linuxFUNNY BATCH PRANK
Add instructable to: