dimanche 17 avril 2016

How to put %random% to a new batch file with a batch file?

I want to but this in to an other .bat file

echo %random% > test.bat
set /a num= +1 
:repeat1 
set /a num= +1 
echo %random% >> test.bat
if ==100 goto end 
goto repeat1

So I have tried with this:

echo echo %every%%random%%random%%random%%random% > "output.txt" > test.bat
echo set /a num=%num% +1 >> test.bat
echo :repeat1 >> test.bat
echo set /a num=%num% +1 >> test.bat
echo echo %every%%random%%random%%random%%random% >> "output.txt" >> test.bat
echo if %num%==%amount% goto end >> test.bat
echo goto repeat1 >> test.bat
:end >> test.bat

But the %% things don't work (it will put a random nummer but I want to have %random% in the new .bat file




Aucun commentaire:

Enregistrer un commentaire