FUNNY BATCH PRANK

3.8K64

Intro: 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

You first have to open notepad

STEP 2: 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:

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.)

4 Comments

"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.

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

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.