Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

using TAB as 'delims' character?!

4,949 views
Skip to first unread message

jonas bergström | it-tekniker.com

unread,
Feb 5, 2000, 3:00:00 AM2/5/00
to
I would like to use TAB (ascii-code 9) as a DELIMS in a FOR command.. but it
won't work anyone got any idea?!

OS: Windows NT Server 4.0

// Jonas Bergström
jonas.b...@it-tekniker.com

Frank-Peter Schultze

unread,
Feb 5, 2000, 3:00:00 AM2/5/00
to
Hi Jonas,

it works if you place the delims-statement at the end of the for /f
options, i.e.:

for /f "tokens=1-4 eol=; delims= " %%a in .......

Peter

jonas bergström | it-tekniker.com

unread,
Feb 5, 2000, 3:00:00 AM2/5/00
to
Hi Frank!

didn't get that to work either.. I don't have to involve eol=, do I ?!..
all ive
got is a tab seperated text file.. it works if it would have been comma
seperated with the following

FOR /F "tokens=1,2,3,4,5 delims=," %%a in ...

I just can't figure out why It won't take TABs..

Jonas.


"Frank-Peter Schultze" <ma...@fpschultze.de> wrote in message
news:389C6776...@fpschultze.de...

Walter Zackery

unread,
Feb 6, 2000, 3:00:00 AM2/6/00
to

This is a known bug with the FOR command. The only workaround is to
either replace the tab-delimited file with another delimiter, or use
some wizardry with the MORE command and the /T switch to replace tabs
with a specified number of spaces. A sophisticated text editor may
come in handy also.

"jonas bergström | it-tekniker.com" <jonas.b...@it-tekniker.com>
wrote in message news:NnZm4.6092$jg4....@nntpserver.swip.net...
: I would like to use TAB (ascii-code 9) as a DELIMS in a FOR

:
:

jonas bergström | it-tekniker.com

unread,
Feb 6, 2000, 3:00:00 AM2/6/00
to
thanx.. I figured it was a bug.. I'll fix the file in a comma seperated
version
I get it from a C program so i'll just use commas instead of spaces!..

// Jonas
jonas.b...@it-tekniker.com


"Walter Zackery" <walter_...@my-Deja.com> wrote in message
news:87j5j6$3292$1...@newssvr04-int.news.prodigy.com...

Berndt Berg

unread,
Feb 6, 2000, 3:00:00 AM2/6/00
to
Jonas,
the proposed solution presented by Frank-Peters Schultze *does* work!

If I have understood you correctly the problem is related to how to use
the TAB (ASCII-code 9) as a delimiter in the FOR command, right!

From the command line, press the TAB key after the equal sign with or
without a preceding comma sign. (You must *not* have 'CompletionChar'
set to x'09' in HKCU\Software\Microsoft\Command Processor for this to work!)
The same handling applies to batch files, simply open the batch file in
Notepad and press the TAB key after the equal sign.

I'm running this on Windows NT Workstation 4.0 revised SP 6a.
I hope this answers and solves your problem.

Regards,
Berndt Berg
Stockholm, Sweden

jonas bergström | it-tekniker.com

unread,
Feb 6, 2000, 3:00:00 AM2/6/00
to
Hi Berndt!

Damn! I got have 'CompletionChar' set to x'09' in
HKCU\Software\Microsoft\Command Processor .. I'll try it out again..

And I appologize to Frank-Peters Schultze.. didn't think about my
CompletionChar Set ..

thanks to both of you!

// Jonas
jonas.b...@it-tekniker.com


"Berndt Berg" <b...@mbox301.swipnet.se> wrote in message
news:p3cn4.6512$jg4....@nntpserver.swip.net...

0 new messages