C
Chris
I'm not sure if this is the right newsgroup -- please let me know if
there is a better one.
I'm trying to construct an environment variable that contains a list of
all the files in a directory. Something like this:
for %%f in (mydir\*.txt) DO set mylist=%mylist%;%%f
This should be equivalent to "set mylist=;file1.txt;file2.txt;file3.txt"
Instead I get "mylist=;file3.txt"
It doesn't seem to be updating the mylist variable on each loop.
Instead, it just saves the value on the last loop.
What am I doing wrong?
there is a better one.
I'm trying to construct an environment variable that contains a list of
all the files in a directory. Something like this:
for %%f in (mydir\*.txt) DO set mylist=%mylist%;%%f
This should be equivalent to "set mylist=;file1.txt;file2.txt;file3.txt"
Instead I get "mylist=;file3.txt"
It doesn't seem to be updating the mylist variable on each loop.
Instead, it just saves the value on the last loop.
What am I doing wrong?