I want to use %random% %%118
to pick a random variable from a number of variables called "song1" through "song118" Here's my current code:
@ECHO off
TITLE Music Randomize
SET count=0
GOTO cont
:func
ECHO %1
SET /A count+=1
SET "song%count%=%1"
GOTO :eof
:cont
FOR %%F IN (C:\Users\153651\Desktop\usic\*) DO CALL :func "%%F"
ECHO %song%random% %%118 +1%
PAUSE
Right now the last ECHO command gives me the output "random18 +1"
. How can I get it to output a random one of the variables?