Batch file tokens ignore empty delimiters
问题 I am trying to load a column from a CSV file into a variable. My CSV file contains empty columns so can have ,, which seems to be ignored by the following: FOR /F "tokens=3 delims=," %%a in (csvfile.csv) do ( set date=%%a echo %%a ) So if file csvfile.csv contains fred,wilma,tony, john, greg, wilber, blake chris,,steve,deon,bryan,mark,anthony I would like the result: tony steve But I get: tony deon If I put a white space in the empty column this does work as expected. How do I set delims so