|hey, thanks! that saved us BOTH a lot of time and frustration.|
see response #1: I re-posted it with all corrections made (rather than waste space posting again here...)
You prob'ly noticed blank lines are not re-iterated...
I also learned a strange and confusing attribute of IF statements, which i consider to be a true "bug".
Usually, you can substitute , @, or any other non-special
char. to enclose a string, but not in a called subroutine. Then you HAVE to use dbl quotes.
the following will NOT work:
for /L %%a in (1 1 3) do (
:: this works here
if [%%a] equ  echo first loop
:: but not here!
if [%xx%] neq  echo not null
but this will work:
if "%xx%" neq "" echo not null
If any other forum-phantoms see this and know why, i would greatly appreciate some enlightenment.