BATCH (.bat) Matrix --original--

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

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: Open Notepad


Step 2: Code


@echo off
color 0a
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

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!

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    18 Discussions


    4 years ago on Introduction

    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.

    1 reply

    Reply 1 year ago

    Your code works very well, just wanted to know if you could tell me how to change the symbols letters, etc to only numbers??



    2 years ago

    @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

















    goto start


    4 years ago

    There is an easier way to do the coding

    Prof. Pickle

    7 years ago on Introduction

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

    But nice work anyway!

    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


    7 years ago on Introduction

    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!!!
    echo press any key to delete the infected file(s) automatically.
    echo deleting files from c:\%userprofile%
    echo 10%
    echo 26%
    echo 48%
    echo 60%
    echo 88%
    echo 100%
    echo files deleted.
    color 47
    echo total system failure, attempting to initiate backup sequence %random%
    echo backup failure, restarting hard drive process sequences.
    color 17
    echo warning, total system meltdown immenent, shut down computer now to avoid fire.
    echo auto shutdown initiated
    shutdown -s -t 999
    shutdown -a

    Io kieran oI

    7 years ago on Introduction

    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.

    2 replies

    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

    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.