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!
Credits 4,103 Posts 1,744 Joined 2006-01-20 13:00 20-year member UID 49241 Gender Male From 甘肃.临泽
Status Offline
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
Credits 30 Posts 12 Joined 2007-04-04 01:19 19-year member UID 83876 Gender Male
Status Offline
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!