I posted this at Stackoverflow but got absolutely no answer to date.

The conundrum is the "folder_set", or "File_set" or folder/file lists part of a "For" command to be referred through a variable. Suppose we wish to define a folder set in the "For /D" by:
Code: Select all
SET "FOLDERSET=X* Y* Zee*"
and hope that something like
Code: Select all
for %%B in (!FOLDERSET!) do (
will produce the miracle of iterating through the arrays as actual folders rather than just a string array. It does appear to work when just using
Code: Select all
SET "FOLDERSET=*"
or
Code: Select all
SET "FOLDERSET=S*"
for folders beginning with "S" or
Code: Select all
SET "FOLDERSET=S* G*"
again for folders beginning with "S" with G* not iterated, but the original problem remains to set up the appropriate delimiters for above wildcard list. Any way possible?