Solved Batch for

July 21, 2011 at 13:06:41
Specs: Windows XP, 3Gs
FOR /F "delims=;" %%a IN ("name1@mail.com;name2@mail.com;name3@mail.com") DO @ECHO %%a

This only print the first entry (name1@mail.com). I would like it to print all of them.

What am I doing wrong?


See More: Batch for

Report •


#1
July 21, 2011 at 13:28:04
✔ Best Answer
"for /f" is line based, you could set up the tokens parameter, but something like this may be what you're after:

FOR %%a IN (name1@mail.com;name2@mail.com;name3@mail.com) DO @ECHO %%a

"for" will split unquoted strings on ";,=<space><tab>"


Report •

#2
July 21, 2011 at 13:34:36
Huh... Guess I miss that part in the learning process.

Thanks!


Report •
Related Solutions


Ask Question