I am following this tutorial on windows script arrays and for loops. The examples are not working, tested on both windows 7 and 10.
When I run the following for loop:
:: @echo off
set list = 1 2 3 4
(for %%a in (%list%) do (
echo %%a
))
I get the following output:
set list = 1 2 3 4
(for %a in ((null)) do (echo %a ) )
The content of the list varialble is not printed in the for loop. I was expecting to get
1
2
3
4
Any ideas?