(I don't have enough points to ask my question there via a comment).
Now, for the first code example mentioned there of:
Code: Select all
set list=A B C D
and the slightly modified code of:
Code: Select all
(for %%a in (%list%) do (
echo %%a
))
That prints A B C D each on a line by itself, so, like this:
Code: Select all
A
B
C
D
If the spaces are removed in the list, so like this:
Code: Select all
set list=ABCD
each letter is not read, and the list prints only this:
Code: Select all
ABCD
1. Why is that happening?
2. How can I get list to be printed on a line of its own when it is created with no spaces?