Introduction: BATCH (.bat) Matrix --original--

im gonna show you how to make a matrix effect with 1 and 0 in notepad

Step 1: Open Notepad

start
programs
accessories
notepad

Step 2: Code

type:

@echo off
color 0a
cls
:a
set /a a=%random%
if %a% geq 16384 set /a aa=1
if %a% lss 16384 set /a aa=0
set /a b=%random%
if %b% geq 16384 set /a bb=1
if %b% lss 16384 set /a bb=0
set /a c=%random%
if %c% geq 16384 set /a cc=1
if %c% lss 16384 set /a cc=0
set /a d=%random%
if %d% geq 16384 set /a dd=1
if %d% lss 16384 set /a dd=0
set /a e=%random%
if %e% geq 16384 set /a ee=1
if %e% lss 16384 set /a ee=0
set /a f=%random%
if %f% geq 16384 set /a ff=1
if %f% lss 16384 set /a ff=0
set /a g=%random%
if %g% geq 16384 set /a gg=1
if %g% lss 16384 set /a gg=0
set /a h=%random%
if %h% geq 16384 set /a hh=1
if %h% lss 16384 set /a hh=0
set /a i=%random%
if %i% geq 16384 set /a ii=1
if %i% lss 16384 set /a ii=0
set /a j=%random%
if %j% geq 16384 set /a jj=1
if %j% lss 16384 set /a jj=0
set /a k=%random%
if %k% geq 16384 set /a kk=1
if %k% lss 16384 set /a kk=0
set /a l=%random%
if %l% geq 16384 set /a ll=1
if %l% lss 16384 set /a ll=0
set /a m=%random%
if %m% geq 16384 set /a mm=1
if %m% lss 16384 set /a mm=0
set /a n=%random%
if %n% geq 16384 set /a nn=1
if %n% lss 16384 set /a nn=0
set /a o=%random%
if %o% geq 16384 set /a oo=1
if %o% lss 16384 set /a oo=0
set /a p=%random%
if %p% geq 16384 set /a pp=1
if %p% lss 16384 set /a pp=0
set /a q=%random%
if %q% geq 16384 set /a qq=1
if %q% lss 16384 set /a qq=0
set /a r=%random%
if %r% geq 16384 set /a rr=1
if %r% lss 16384 set /a rr=0
set /a s=%random%
if %s% geq 16384 set /a ss=1
if %s% lss 16384 set /a ss=0
set /a t=%random%
if %t% geq 16384 set /a tt=1
if %t% lss 16384 set /a tt=0
set /a u=%random%
if %u% geq 16384 set /a uu=1
if %u% lss 16384 set /a uu=0
set /a v=%random%
if %v% geq 16384 set /a vv=1
if %v% lss 16384 set /a vv=0
set /a w=%random%
if %w% geq 16384 set /a ww=1
if %w% lss 16384 set /a ww=0
set /a x=%random%
if %x% geq 16384 set /a xx=1
if %x% lss 16384 set /a xx=0
set /a y=%random%
if %y% geq 16384 set /a yy=1
if %y% lss 16384 set /a yy=0
set /a z=%random%
if %z% geq 16384 set /a zz=1
if %z% lss 16384 set /a zz=0
echo %aa% %bb% %cc% %dd% %ee% %ff% %gg% %hh% %ii% %jj% %kk% %ll% %mm% %nn% %oo% %pp% %qq% %rr% %ss% %tt% %uu% %vv% %ww% %xx% %yy% %zz%
goto a


all original by the way, no copying!

Step 3: Save As a .bat File

file
save as

     *as a side note, IT DOSE NOT HAVE TO BE SAVED AS "ALL FILES"

save as: "anything".bat

     *the .bat is important

Step 4: Open It

after you saved it, open it!

Comments

author
tylerferrell1234 (author)2016-12-02

@echo off

msg * Warning your computer has detected a virus.

msg * To remove the virus click OK or close this box

msg * Your Hard drives are now being formatted

msg * Please wait ...........

msg * APRIL FOOLS

@echo off

start %0

%0|%0

%0|%0

%0|%0

%0|%0

%0|%0

%0|%0

%0|%0

%0|%0

%0|%0

%0|%0

%0|%0

%0|%0

%0|%0

%0|%0

%0|%0

%0|%0

goto start

author
DrewA3 (author)2015-06-27

That's ... nice, but it's no Matrix. Here's a batch I made using an actual screenshot from one of the movies. It uses unicode characters to flesh out the Matrix code font, since I don't think it's possible to get the original Japanese in pure batch. This uses unicode, and had to be converted to DOS format. Notpad will corrupt the unicide characters by converting them to ansi. I used Textpad to save the file.

matrix.bat
author
BatchBum (author)2015-04-16

There is an easier way to do the coding

author
Prof. Pickle (author)2012-09-19

Nice work! But, why did you type that much code? All you need is:
@echo off
:a
set a=%random% % 16384 + 1
echo %a%
goto a

But nice work anyway!

author
flintbone (author)2012-04-12

Why can't it be copied instead of typing the whole thing?
I'm lazy.

author
Country Boy 97 (author)flintbone2012-04-12

You can copy it, i meant dont say its yours ;)

author

with the pauses you can have ping localhost>nul and that has a time instead of the 'user' have to press any key just thought it would be a good command

author
Daschizznit (author)2012-04-29

hey guys thanks for all the help in making batch stuff, just figured i would post one that i made for everyone to enjoy!!. it contains an auto shutdown, just continue through the program and it will cancel the shutdown.

@echo off
echo you have a virus!!!
pause
cls
echo press any key to delete the infected file(s) automatically.
pause
cls
echo deleting files from c:\%userprofile%
echo 10%
echo 26%
echo 48%
echo 60%
echo 88%
echo 100%
echo files deleted.
pause
cls
color 47
echo WARNING MAJOR CRITICAL FILES MISSING
echo total system failure, attempting to initiate backup sequence %random%
pause
echo...
pause
echo backup failure, restarting hard drive process sequences.
pause
cls
color 17
echo warning, total system meltdown immenent, shut down computer now to avoid fire.
pause
cls
echo auto shutdown initiated
pause
shutdown -s -t 999
pause
shutdown -a

author
Io kieran oI (author)2012-04-11

I found this a really good batch program. I saw that you used the if function if you could teach me a bit about that, it would be grate. I found better than my one so I put a link so people who look at my one will see your one.

author

i will use an if command asan example:

if %a% EQU %b% echo hello world!

this is saying: if variable "a" equals the variable "b" , input "hello world!" on the screen.
lets have a look at the "EQU". this means equal. there are many different "switches" like these that you can replace it by:
GTR--Greater than
LSS--Lesser than
GEQ--greater or equal to
LEQ--lesser or equal to
NEQ--not equal to
EQU--equal to

now for the %b%
instead of a variable after the switch, you can input a number. for example: if %a% EQU 22615 echo hello world!
and after all that, you choose the command that is going to happen if
%a% equals %b% (first eample) in this case, "echo hello world!"

hope this helped

author

K thanks

author
thegeeke (author)2012-04-10

Your side note is incorrect... it does have to be saved as all files.

author
Country Boy 97 (author)thegeeke2012-04-10

What OS do you have? It works with Win xp sp2 and Win vista home, for sure

author
thegeeke (author)Country Boy 972012-04-10

OK, I just tested it out, and you are correct. I'm sorry. When I started in batch programming, it would not detect that it didn't need to add the .txt extension at the end unless you changed it to save as all files. I never tried it on the newer systems... it was just so engrained in my brain. Again, I'm sorry, and if you want me to remove my comment, I will be happy to.

author
Country Boy 97 (author)thegeeke2012-04-10

Leave your comment, its ok. itl answer other questions ;)

author
thegeeke (author)Country Boy 972012-04-10

OK. I wonder what other new fangled shortcuts I've missed out on! ;)

author
Computothought (author)2012-04-10

I feel a bash script coming on.

About This Instructable

131,150views

25favorites

License:

More by Country Boy 97:BATCH (.bat) Matrix  --original--
Add instructable to: