07-23-2023, 09:37 AM
I'm trying to use the Windows batch [FOR command](
How do I specify a TAB character as a delimiter? The default is space and tab, but I want tab only.
I've tried this, but it doesn't work:
<!-- language: lang-batch -->
FOR /F "tokens=3 delims=^T" %i in (test.txt) do @echo %i
It seems to be splitting on the T character instead of a tab. I've also tried a literal <TAB> pasted into the command prompt, but I get a syntax error.
[To see links please register here]
).How do I specify a TAB character as a delimiter? The default is space and tab, but I want tab only.
I've tried this, but it doesn't work:
<!-- language: lang-batch -->
FOR /F "tokens=3 delims=^T" %i in (test.txt) do @echo %i
It seems to be splitting on the T character instead of a tab. I've also tried a literal <TAB> pasted into the command prompt, but I get a syntax error.