Windows Batch Script: split comma delimited string and loop through the tokens








@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION

SET emails=a@b.com,c@d.org,e@f.gov
SET emails=%emails:,= %

FOR %%e in (%emails%) DO (
    echo %%e
)



No comments:

Post a Comment