Random variable not changing in "for" loop in windows batch file

Viewed 12205

I'm trying to print out a Random number multiple times but in the for loop I use, it doesn't reset the variable. Here's my code.

@echo off


for %%i in (*.txt) do (

set checker=%Random%
echo %checker%
echo %%i% >> backupF 

)   


echo Complete

There are 5 text files and so I want it to print 5 different random numbers but it just prints the same random number 5 times. Any help would be greatly appreciated. Thanks!

2 Answers
Related