REM test.bat contents
for /F "tokens=1-3 delims=," %%a in (test.csv) do @Echo %%a, %%b, %%c
;test.csv contents (this line is a comment)
;1,ignore this line,no it shouldn't
2,parse this line,yes it should!
;3,ignore this line,no it shouldn't
4,parse this line,yes it should!
输出:
2, parse this line, yes it should!
4, parse this line, yes it should!