|
FBOAR
初级用户
 
积分 86
发帖 31
注册 2007-1-9
状态 离线
|
『楼 主』:
这个txt该怎么读取指定的值?
使用 LLM 解释/回答一下
已经搞定...感谢lxmxn的解答以及楼下所有关注的朋友 ccwan很热心哈 谢谢~
现有a.txt,内容如下:
Windows Registry Editor Version 5.00
@=hex(3ef):
也就是有三行是空的 求解该txt如何读取3ef这个值??
试了几次 还是不行
<img src="images/smilies/face-raspberry.png" align="absmiddle" border="0">
怎么每次都说不清楚 不好意思
我想用这个批处理 echo 3ef这个值 没成功
for /f "eol=
<>
Last edited by FBOAR on 2007-1-17 at 06:33 PM ]
Already done...Thanks to lxmxn's answer and all the friends who paid attention downstairs. ccwan is very enthusiastic. Thanks~
There is a.txt, the content is as follows:
Windows Registry Editor Version 5.00
@=hex(3ef):
That is, there are three empty lines. Please solve how to read the 3ef value in this txt??
Tried several times, still not working
:P
Why do I always say it unclear every time, sorry
I want to use this batch processing echo 3ef value, not successful
for /f "eol=
Last edited by FBOAR on 2007-1-17 at 06:33 PM ]
|
|
2007-1-18 05:51 |
|
|
ccwan
金牌会员
     
积分 2725
发帖 1160
注册 2006-9-23 来自 河北廊坊
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
能说详细点吗?
Can you be more specific?
|

三人行,必有吾师焉。 学然后知不足,教然后知困,然后能自强也。 |
|
2007-1-18 06:08 |
|
|
ccwan
金牌会员
     
积分 2725
发帖 1160
注册 2006-9-23 来自 河北廊坊
状态 离线
|
|
2007-1-18 06:09 |
|
|
hxuan999
中级用户
   DOS之日
积分 337
发帖 161
注册 2006-11-4
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
不明白,就是读出3ef吗?
Last edited by hxuan999 on 2007-1-17 at 06:12 PM ]
Don't understand, just read out 3ef?
Last edited by hxuan999 on 2007-1-17 at 06:12 PM ]
|

for /f %%h in (`echo hxuan`) do for /f %%x in (`echo hxuan`) do if %%h==%%x nul |
|
2007-1-18 06:11 |
|
|
tao0610
高级用户
    朦胧的世界
积分 579
发帖 218
注册 2006-10-24
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
多种方法.
for+more
for+findstr
for skip
findstr+变量截取.....
Multiple methods.
for+more
for+findstr
for skip
findstr+variable interception.....
|

认识自己,降伏自己,改变自己,才能改变别人! |
|
2007-1-18 06:12 |
|
|
NaturalJ0
银牌会员
    
积分 1181
发帖 533
注册 2006-8-14
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
楼主应该把读取“规则”说清楚。否则可能有N种解决方案,但不一定都能真正符合你的要求。
The owner of the post should make the reading "rules" clear. Otherwise, there may be N kinds of solutions, but not necessarily all can truly meet your requirements.
|
|
2007-1-18 06:14 |
|
|
FBOAR
初级用户
 
积分 86
发帖 31
注册 2007-1-9
状态 离线
|
|
2007-1-18 06:24 |
|
|
9527
银牌会员
     努力做坏人
积分 1185
发帖 438
注册 2006-8-28 来自 北京
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
就按照楼主这个文件,下面代码应该可以
for /f "tokens=3 delims==()" %a in (test.reg) do @echo %a
Just follow the file from the original poster, the following code should work
for /f "tokens=3 delims==()" %a in (test.reg) do @echo %a
此帖被 +2 点积分 点击查看详情 评分人:【 FBOAR 】 | 分数: +2 | 时间:2007-1-18 07:31 |
|
|

我今后在论坛的目标就是做个超级坏人!!! |
|
2007-1-18 06:25 |
|
|
FBOAR
初级用户
 
积分 86
发帖 31
注册 2007-1-9
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
楼上的好像不行 试了下
It seems that the one upstairs doesn't work. I tried it.
|
|
2007-1-18 06:37 |
|
|
ccwan
金牌会员
     
积分 2725
发帖 1160
注册 2006-9-23 来自 河北廊坊
状态 离线
|
|
2007-1-18 06:39 |
|
|
tao0610
高级用户
    朦胧的世界
积分 579
发帖 218
注册 2006-10-24
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
for /f "eol=[ tokens=2 delims=()" %%i in (a.txt) do set d=%%i
echo %d%
pause
怎么没成功?提示什么?
@=hex(3ef):下面没东西了吧.
for /f "eol=
|

认识自己,降伏自己,改变自己,才能改变别人! |
|
2007-1-18 06:42 |
|
|
FBOAR
初级用户
 
积分 86
发帖 31
注册 2007-1-9
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
Originally posted by tao0610 at 2007-1-17 05:42 PM:
for /f "eol=
--- 有两个空行的
返回
echo 处于打开状态
下面的路径中的变量也就无效了
我写的就是这个 大家可以试下 导出用户名guest的
reg export "HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Account\Users\Names\guest" c:\a.reg
for /f "eol=
Originally posted by tao0610 at 2007-1-17 05:42 PM:
for /f "eol=
--- There are two blank lines
Return
echo is in the open state
The variables in the following path are also invalid
I wrote this. Everyone can try exporting the username guest
reg export "HKEY_LOCAL_MACHINE\SAM\SAM\Domains\Account\Users\Names\guest" c:\a.reg
for /f "eol=
|
|
2007-1-18 06:53 |
|
|
everest79
金牌会员
      一叶枝头,万树皆春
积分 2564
发帖 1127
注册 2006-12-25
状态 离线
|
『第 13 楼』:
使用 LLM 解释/回答一下
HKLM\SAM是安全路径,不修改设置是没办法访问的
for /f "tokens=3" %%i in ('reg query "HKLM\SAM\SAM\DOMAINS\ACCOUNT\USERS\NAMES\GUEST" /ve^|find "没有名称"') do (
for /f "tokens=2 delims=x" %%j in ("%%i") do set a=%%b)
HKLM\SAM is a secure path, and access cannot be obtained without modifying settings.
for /f "tokens=3" %%i in ('reg query "HKLM\SAM\SAM\DOMAINS\ACCOUNT\USERS\NAMES\GUEST" /ve^|find "No name"') do (
for /f "tokens=2 delims=x" %%j in ("%%i") do set a=%%b)
|
|
2007-1-18 08:21 |
|
|
minmin888
初级用户
 
积分 127
发帖 62
注册 2007-4-19
状态 离线
|
『第 14 楼』:
使用 LLM 解释/回答一下
for /f "tokens=2 delims=()" %a in (test.reg) do @echo %a 这样更好理解!
for /f "tokens=2 delims=()" %a in (test.reg) do @echo %a This is easier to understand!
|
|
2007-5-8 14:32 |
|