title: Random Variables in Batch Files
body: <p>I am trying to create a random variable between 0 and 3 with a batch file. Right now I have the following code:</p>
  
  <pre><code>@echo off
  set /a var=%random%/8192
  @echo %var%
  Pause
  </code></pre>
  
  <p>This batch file returns "2" every time. If I type the same commands into the command line directly it returns 0 through 3.</p>
  
  <p>Any related knowledge would be appreciated :)</p>