![]() |
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-29 08:05 |
47,816 topics / 349,916 posts / today 0 new / 48,265 members |
| DOS批处理 & 脚本技术(批处理室) » How to read specified values from this txt? |
| Printable Version 2,837 / 13 |
| Floor1 FBOAR | Posted 2007-01-18 05:51 |
| 初级用户 Posts 31 Credits 86 | |
|
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 ![]() 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 ] |
|
| Floor2 ccwan | Posted 2007-01-18 06:08 |
| 金牌会员 Posts 1,160 Credits 2,725 From 河北廊坊 | |
|
Can you be more specific?
|
|
| Floor3 ccwan | Posted 2007-01-18 06:09 |
| 金牌会员 Posts 1,160 Credits 2,725 From 河北廊坊 | |
| Floor4 hxuan999 | Posted 2007-01-18 06:11 |
| 中级用户 Posts 161 Credits 337 | |
|
Don't understand, just read out 3ef?
[ Last edited by hxuan999 on 2007-1-17 at 06:12 PM ] |
|
| Floor5 tao0610 | Posted 2007-01-18 06:12 |
| 高级用户 Posts 218 Credits 579 | |
|
Multiple methods.
for+more for+findstr for skip findstr+variable interception..... |
|
| Floor6 NaturalJ0 | Posted 2007-01-18 06:14 |
| 银牌会员 Posts 533 Credits 1,181 | |
|
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.
|
|
| Floor7 FBOAR | Posted 2007-01-18 06:24 |
| 初级用户 Posts 31 Credits 86 | |
|
It's okay, you've made an edit.
|
|
| Floor8 9527 | Posted 2007-01-18 06:25 |
| 银牌会员 Posts 438 Credits 1,185 From 北京 | |
|
Just follow the file from the original poster, the following code should work
|
|
| Floor9 FBOAR | Posted 2007-01-18 06:37 |
| 初级用户 Posts 31 Credits 86 | |
|
It seems that the one upstairs doesn't work. I tried it.
|
|
| Floor10 ccwan | Posted 2007-01-18 06:39 |
| 金牌会员 Posts 1,160 Credits 2,725 From 河北廊坊 | |
| Floor11 tao0610 | Posted 2007-01-18 06:42 |
| 高级用户 Posts 218 Credits 579 | |
|
for /f "eol=[ tokens=2 delims=()" %%i in (a.txt) do set d=%%i
echo %d% pause Why didn't it succeed? What's the prompt? @=hex(3ef):There's nothing below, right. |
|
| Floor12 FBOAR | Posted 2007-01-18 06:53 |
| 初级用户 Posts 31 Credits 86 | |
Originally posted by tao0610 at 2007-1-17 05:42 PM: |
|
| Floor13 everest79 | Posted 2007-01-18 08:21 |
| 金牌会员 Posts 1,127 Credits 2,564 | |
|
HKLM\SAM is a secure path, and access cannot be obtained without modifying settings.
|
|
| Floor14 minmin888 | Posted 2007-05-08 14:32 |
| 初级用户 Posts 62 Credits 127 | |
|
for /f "tokens=2 delims=()" %a in (test.reg) do @echo %a This is easier to understand!
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |