中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-04 02:10
48,038 topics / 350,123 posts / today 0 new / 48,251 members
DOS批处理 & 脚本技术(批处理室) » [Help] Need a solution!
Printable Version  681 / 4
Floor1 myccmc Posted 2007-04-04 09:24
初级用户 Posts 12 Credits 30
Floor2 vkill Posted 2007-04-04 09:31
金牌会员 Posts 1,744 Credits 4,103 From 甘肃.临泽
for /f "tokens=2* delims==" %%? in ('type life^|findstr "^执行程序="') do (
set "v=%%?"
if not defined v (echo There is no program name on the 执行程序 line)
)
pause

Something like this
Floor3 myccmc Posted 2007-04-04 11:26
初级用户 Posts 12 Credits 30
It doesn't work, I already tried it, and it gives an error when run!
Floor4 dikex Posted 2007-04-04 11:44
高级用户 Posts 366 Credits 788
type life^|findstr "^执行程序="

According to the OP's requirement, this should be:

type 设置.ini ^|findstr "^执行程序="
Floor5 myccmc Posted 2007-04-04 11:56
初级用户 Posts 12 Credits 30
How do I detect whether 设置.ini has
执行程序= (if there is a line with this content, I need to detect whether there is exit.exe after the equals sign; it may not necessarily be exit.exe, it could also be run.bat)
There may be several lines like 执行程序=xxx.xxx in this file
The above batch file doesn't work!
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023