Friday, 30 January 2015

Batch files are fun

A notepad is seem to be a simple text editor, but what it can do with file-name extension is so much fun. I am showing you some simple tips and tricks with '.bat' extension, what you can do to make the best out of it.


1. Matrix Digital Rain:



I hope you all have watched Matrix movie and obviously seen those green color codes which run on their computers. Yeah, I will show you how to generate that effect, The Matrix digital rain effect.

@echo OFF
color 02
:matrix
echo %random%%random%%random%%random%%random%%random%
goto matrix

Copy code in notepad and save it with file-name extension '.bat'.
Here, @echo off is used to hide following commands. and color 02 is used to make text appear green on a black background. A loop is generated then, which produce some random numbers.

2. Continuous Ping Batch file

Batch files can be used to make continuous ping on any network device. We have talked about it in my previous post Continuous PING Batch File.
The code is:

@echo OFF
date/t >>ping.txt
time/t >>ping.txt
ping [IP/URL] -t >>ping.txt

Results are save in text file ping.txt with automatic date and time stamp.


3. Continuous Pop-up message

You can freak your friends by making a desired message pop-up continuously.

@echo off
:pop
msg *man, you are fool*
goto pop

4. Shutdown system giving any funny reason

In my previous post I told you how to shutdown PC via cmd. You can give any funny reason to play with your friend.
shutdown -s -t 300 -c "I am fed with you, Rishabh. I quit."  

5. Crash system by opening multiple cmd or notepad

Crash your friend system by running following commands. But remember that you have to remove battery from you laptop or unplug your system to end this prank.

Notepad

@echo off
:TOP
START %SystemRoot%/system32/notepad.exe
goto TOP

CMD

@echo off
:TOP
start
goto TOP


6. Make multiple folders

Following command generate a number of folders in your drive.

@echo OFF
:top
md %random%
goto top

See, that is fun, naa!!! It is just a starting. Click your own mind and you can play it really scary.
So, run you own batch files and have fun.

That's it for now. Bye.

1 comment: