@echo off
:start
SET /A number=%RANDOM% * 3 / 32768 + 1
echo %number%>number.txt
PING localhost -n 2 >NUL
goto start
It should generate a random number from 1-3. And it does. But the .txt file is just empty and in the console, I get the message: "Echo is turned off".
Can someone help me?