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-06-22 12:38
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » 请问如果在文本中抽取指定字符赋值于变量中 Please ask if you want to extract specified characters from text and assign them to variables View 5,752 Replies 32
Floor 31 Posted 2006-12-14 22:56
中级用户
★★
DOS之日
Credits 337
Posts 161
Joined 2006-11-04 05:27
19-year member
UID 69523
Gender Male
Status Offline
Tested again,, "%0 "%~f0" indeed doesn't return later, may I ask why this is?
In addition, in order to let others see this problem, I won't modify the previous content, here I admit my mistake, hehe.
for /f %%h in (`echo hxuan`) do for /f %%x in (`echo hxuan`) do if %%h==%%x nul
Floor 32 Posted 2006-12-15 08:55 ·  中国 江西 南昌 电信
银牌会员
★★★
天的白色影子
Credits 2,343
Posts 636
Joined 2004-03-06 00:00
22-year member
UID 19350
Gender Male
Status Offline
There is no why ~@$%

Directly calling a batch file in batch processing will not return.

It has been this way since the DOS era.

Unless you use methods like call, start, %comspec% /c, etc. to call, it will return.

So essentially, directly calling a batch file is equivalent to a flow jump jump / goto.

Calling like call is equivalent to interrupt execution int / call.
Floor 33 Posted 2006-12-16 03:10
中级用户
★★
DOS之日
Credits 337
Posts 161
Joined 2006-11-04 05:27
19-year member
UID 69523
Gender Male
Status Offline
Got it. Thanks, hehe
for /f %%h in (`echo hxuan`) do for /f %%x in (`echo hxuan`) do if %%h==%%x nul
Forum Jump: