Tutorial : How to Create a Random Number?

This tutorial will tell you how to create a random number with batch file. Works with Xp and Vista the same way.

This tutorial is real easy, can be made in 60 secondes. You don’t need to be an expert to do this stuff.

I’ll show you 3 things :

  1. Create a random number
  2. Create lots of random numbers ( scrolling like matrix )
  3. Create lots of random numbers ( but appearing everything 3 secondes )

Why create random numbers ?

  1. It’s usefull for a PIN number or other stuff like that.
  2. It’s just fun, and you learn something.
  3. You make decision with it : example : if the number ends between 1 and 5 we got eat sushi if not we go burger king.
  4. You can transforme it ( change random with some text and creat some cool stuff )

Have Fun !

Start

  • OK, first, open notepad.
  • and write the following :

@echo off

echo %random%

pause

  • Save it under a .bat file ( as shown below) ( example : random.bat )

  • Close the notepad window, and double click on your .bat file
  • You will see a random number on your screen

Or

  • To creat infinit numbers ( random numbers every 0.1 sec ) write the following :

@echo off

:a

echo %random%

goto :a

  • Save it as a .bat fille ( example : randominfo.bat )
  • Close the notepad window, and double click on your .bat file
  • You will see lots of random number on your screen

Or

  • To creat a random number everything 3seconds write the following :

@echo off

:a

echo %random%

ping hostlocal -n 3> nul

goto :a

  • Save it as a .bat fille ( example : randominfo.bat )
  • Close the notepad window, and double click on your .bat file
  • You will see lots of random number on your screen

There, you now know everything !!!! You can creat passwords, or pins without problems anymore !

Hint add as much %random% after the “echo %random%” to make the number bigger

Excample : echo %random% %random% %random% %random% %random%

You’ll maybe get : 578 8221 4687 1 278

Have fun

One Response

09.08.26

Lol, nice.. it’s a fun thing to do for a nerd like me.

Leave Your Response