Set /A Count=1
:LOOP
SET Temp[%Count%]=A
SET /A Count+=1
IF %Count%==10 (GOTO EOF) ELSE GOTO LOOP
——————————————————————-
Command Line: ECHO %Temp[1]%
Output = A
Although what I want to do is to use a variable in place of the “1” in “Temp[1]”
That way I can recall the entire array again
similar to how I originally created it using a Loop and Counter.
1 – Set /A Count=1
2 – :LOOP
3 – ECHO %Temp[%Count%]%
4 – IF %Count%==10 (GOTO EOF) ELSE GOTO LOOP
——————————————————————-
Line 3: Is where I have the problem. I don’t know the correct code/syntax to be able to output the data stored in the array.
The code will only output the name of the array. Any Suggestions?
1 Answer