China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-11 14:03
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How can I add custom delimiters to the delims parameter in the for command? View 852 Replies 2
Original Poster Posted 2009-03-06 04:26 ·  中国 广东 佛山 电信
新手上路
Credits 13
Posts 6
Joined 2009-02-24 16:43
17-year member
UID 139745
Gender Male
Status Offline
In the help for the for command, the explanation for delims is as follows:

delims=xxx - Specifies a delimiter set. This replaces the
default delimiter set of spaces and tabs.


If I need the default delimiter set, but also want to add other delimiters, how can I do that?

Actually, the above question can also be understood as: how do I input a “tab”!
Because as long as I can input a tab, I can keep the original delimiter set.
Floor 2 Posted 2009-03-06 07:41 ·  中国 广东 东莞 电信
银牌会员
★★★
批处理编程迷
Credits 1,916
Posts 752
Joined 2008-12-28 04:30
17-year member
UID 135147
Gender Male
From 广西
Status Offline
Doesn't anyone know what the Tab key on the keyboard is for? Who knows?

for /f "delims=a" %%a in ('dir') do echo %%a

[ Last edited by netbenton on 2009-3-6 at 05:43 ]
精简
=> 个人网志
Floor 3 Posted 2009-03-08 09:56 ·  中国 广东 佛山 电信
新手上路
Credits 13
Posts 6
Joined 2009-02-24 16:43
17-year member
UID 139745
Gender Male
Status Offline
Originally posted by netbenton at 2009-3-6 07:41:
Doesn't anyone know what the Tab key on the keyboard is for? Who knows?

for /f "delims=a" %%a in ('dir') do echo %%a

[ Last edited by netbenton on 2009-3-6 at 05:43 ]



In a batch file, brother, what you said is correct, but in DOS command-line mode, pressing the TAB key seems to have no response :(
Forum Jump: