Why would you think %%t would work
I see no logic in that
You specify %%m as the base character. Subsequent assignments simply follow the normal alpha sequence, so you should use %%m and %%n. (actually the sequence is based on Unicode code points, in case you use something other than ASCII letters)
Code: Select all
@echo off
for /f "tokens=1,3 delims=," %%m in (weather.txt) do (echo %%m %%n)
The skipped tokens do not impact the assigned symbol, and duplicate "tokens" values are ignored. The assignments are always done from left to right, from the standpoint of the input, regardless of the order of the "tokens" specification.
So the following would give the same result
Code: Select all
for /f "tokens=3,3,1,3,1 delims=," %%m in (weather.txt) do (echo %%m %%n)
Dave Benham