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-07-05 20:32
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Share] Batch Processing to Read INI File View 13,212 Replies 44
Floor 31 Posted 2008-03-17 14:59 ·  中国 浙江 温州 电信
新手上路
Credits 0
Posts 1
Joined 2007-05-22 21:23
19-year member
UID 89007
Gender Male
Status Offline
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
HAT -2 2008-11-21 10:20
Floor 32 Posted 2008-04-03 17:02 ·  中国 北京 鹏博士BGP
新手上路
Credits 8
Posts 3
Joined 2008-01-12 17:38
18-year member
UID 108411
Gender Male
Status Offline
Very good, download it back and study it
Floor 33 Posted 2008-04-03 17:28 ·  中国 四川 达州 电信
新手上路
Credits 8
Posts 4
Joined 2008-04-02 15:02
18-year member
UID 114751
Gender Male
Status Offline
It's points again!!!!!
Floor 34 Posted 2008-04-03 23:16 ·  中国 河南 郑州 联通
初级用户
Credits 35
Posts 17
Joined 2008-04-03 01:33
18-year member
UID 114814
Gender Male
Status Offline
Collected it, it's very useful, thanks to the author.
Floor 35 Posted 2008-04-04 01:10 ·  中国 广东 广州 海珠区 电信
新手上路
Credits 4
Posts 2
Joined 2008-04-04 00:10
18-year member
UID 114908
Gender Male
Status Offline
For a little points, I upvote
Floor 36 Posted 2008-04-06 18:25 ·  中国 广西 桂林 电信
初级用户
Credits 38
Posts 15
Joined 2008-03-07 12:48
18-year member
UID 112277
Gender Male
Status Offline
It seems that it automatically exits as soon as it runs, and the next statement cannot be executed...
Floor 37 Posted 2008-04-06 19:30 ·  中国 北京 海淀区 联通
银牌会员
★★★
Credits 1,287
Posts 634
Joined 2007-05-02 15:06
19-year member
UID 87277
Gender Male
From cmd.exe
Status Offline
Did you add the parameters or not!!!
Floor 38 Posted 2008-04-07 17:54 ·  日本
新手上路
Credits 12
Posts 6
Joined 2008-02-21 22:25
18-year member
UID 111169
Gender Male
Status Offline
Floor 39 Posted 2008-04-12 15:31 ·  中国 湖北 黄石 电信
初级用户
Credits 62
Posts 30
Joined 2007-12-01 17:51
18-year member
UID 104364
Gender Male
Status Offline
Good stuff, give it a boost! Don't let it sink!
Floor 40 Posted 2008-04-21 12:36 ·  中国 浙江 湖州 电信
新手上路
Credits 15
Posts 5
Joined 2008-04-21 11:09
18-year member
UID 116482
Gender Male
Status Offline
Originally posted by yangzhiyi at 2007-3-17 07:52 AM:
There is still one parameter missing. There should be a function to read the value of the item, such as
timeout=3
get 3

Now
inifile c:\boot.ini "" timeout
:: display ...

=================================
You can add the following code below
for /f "delims=;" %%x in ("%%i=%%j") do (
if not DEFINED item (echo %%x) else (
setlocal EnableDelayedExpansion
call :trim a
if /i "!a!"=="%item%" (
if "%setvar%"=="1" (
endlocal&set "%%x"
) else (
call :item_v " %%x"
rem endlocal&echo %%x

)
)
)
)

:item_v
set a=%1
endlocal&echo %a:~6,1% //Here you can set how many values to take by yourself or add more code to get values automatically.....
goto :eof
Floor 41 Posted 2008-04-21 20:26 ·  中国 山东 临沂 电信
初级用户
★★
Credits 100
Posts 67
Joined 2007-06-08 16:48
19-year member
UID 90687
Gender Male
Status Offline
Come down, take a look......
Floor 42 Posted 2008-05-04 11:10 ·  中国 辽宁 锦州 电信
初级用户
Credits 64
Posts 46
Joined 2008-04-21 14:54
18-year member
UID 116504
Gender Male
Status Offline
Thanks, chenall, learned it.
Floor 43 Posted 2008-05-10 11:47 ·  中国 广东 广州 花都区 电信
中级用户
★★
Credits 233
Posts 117
Joined 2007-11-28 02:38
18-year member
UID 104005
Gender Male
Status Offline
Good post, learned it, push it up, don't let the good post sink
Floor 44 Posted 2008-11-21 09:06 ·  中国 福建 厦门 电信
新手上路
Credits 2
Posts 2
Joined 2007-01-18 14:35
19-year member
UID 76910
Gender Male
Status Offline
Floor 45 Posted 2008-11-21 09:06 ·  中国 福建 厦门 电信
新手上路
Credits 2
Posts 2
Joined 2007-01-18 14:35
19-year member
UID 76910
Gender Male
Status Offline
Forum Jump: