I would like to know if it's possible or other ways to get this:
@echo off
setlocal enableDelayedExpansion
SET loopcount=3
SET variable1=test1
SET variable2=test2
SET variable3=test3
for /l %%x in (1, 1, %loopcount%) do {
echo %variable%%x%
}
As you can see in echo, I want to get the value of variable1 which is test1 and so on... Is there any workaround on this? Thank you.
call echo %%variable%%x%%orecho !variable%%x!For /L %%x in (1 1 3)Do For /F "Tokens=2* Delims==" %%G in (' Set "Variable%%x" 2^> nul ')Do Echo(%%G