General discussion
October 19, 2001 at 09:35 AM
karlww

NT Command Shell: FOR command bug?

by karlww . Updated 24 years, 10 months ago

Has anyone ever seen this one? Is it a bug?

The documentation for the FOR command states that the default delimiters are space and tab. In Win2K, this is true. However in NT 4.0 SP6, I cannot get FOR to recognize tabs.

i.e.
given a tab delimited text file (data.txt)
1 2 3
4 5 6

the command;
for /f “tokens=2” %i in (data.txt) do @echo %i

Win2K Output
2
5

NT Output…not a thing

Is there anyway to manually specify a tab using delim=? I tried “tokens=2 delims=\t” to no avail.

This discussion is locked

All Comments