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-08-09 15:21
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How can a batch file read this text~! View 867 Replies 7
Original Poster Posted 2008-08-21 20:49 ·  中国 广东 深圳 电信
初级用户
Credits 31
Posts 15
Joined 2007-11-26 15:40
18-year member
UID 103825
Gender Male
Status Offline
-------------------------------------------------------------------------------------------

Version EVEREST v4.20.1170/cn
Homepage http://www.lavalys.com/
Report Type Command line
Computer HY20080821
User Administrator
Operating System Microsoft Windows XP Professional 5.1.2600 (WinXP Retail)
Date 2008-08-21
Time 20:15


----------------------------------------------------------------------------------------------------------------

Computer:
Computer Type Advanced Configuration and Power Interface (ACPI) PC
Operating System Microsoft Windows XP Professional
Operating System Service Pack Version Service Pack 3
Internet Explorer 6.0.2900.5512
DirectX 4.09.00.0904 (DirectX 9.0c)
Computer Name HY20080821
User Name Administrator
Logon Domain 20080821-1647
Date/Time 2008-08-21 / 20:15

Motherboard:
CPU Type Intel Celeron D, 2633 MHz
Motherboard Name Microsoft Virtual Machine
Motherboard Chipset Intel 82440BX/ZX
System Memory 256 MB (EDO)
BIOS Type AMI (02/22/06)
Communication Port Communication Port (COM1)
Communication Port Communication Port (COM2)
Communication Port Printer Port (LPT1)

Display Devices:
Video Adapter S3 Trio32/64 (4 MB)

Multimedia:
Sound Card Sound Blaster 16

Storage:
IDE Controller Intel(R) 82371AB/EB PCI Bus Master IDE Controller
Floppy Drive Floppy disk drive
Disk Drive Virtual HD (78 GB, IDE)
CD-ROM Drive MS C/DVD-ROM (Virtual DVD-ROM)
Hard Disk SMART Status Unknown

Partitions:
C: (FAT32) 19977 MB (17765 MB available)
D: (FAT32) 19992 MB (19454 MB available)
E: (FAT32) 19992 MB (19992 MB available)
F: (FAT32) 19992 MB (15896 MB available)
Total Capacity 78.1 GB (71.4 GB available)

Input:
Keyboard QuickOn Button
Mouse Microsoft PS/2 Mouse

Network:
Primary IP Address 192.168.1.251
Primary MAC Address 00-03-FF-CC-E7-B2
Network Adapter Intel 21140-Based PCI Fast Ethernet Adapter (Generic) (192.168.1.251)

DMI:
DMI BIOS Vendor American Megatrends Inc.
DMI BIOS Version 080002
DMI System Manufacturer Microsoft Corporation
DMI System Product Virtual Machine
DMI System Version VS2005R2
DMI System Serial Number 9569-1788-1256-8464-7640-6305-22
DMI System UUID 70B18BC5-F81B8C43-B5A30D4A-C1B435AB
DMI Motherboard Manufacturer Microsoft Corporation
DMI Motherboard Product Virtual Machine
DMI Motherboard Version 5.0
DMI Motherboard Serial Number 9569-1788-1256-8464-7640-6305-22
DMI Chassis Manufacturer Microsoft Corporation
DMI Chassis Version 5.0
DMI Chassis Serial Number 9569-1788-1256-8464-7640-6305-22
DMI Chassis Asset Tag 9569-1788-1256-8464-7640-6305-22
DMI Chassis Type Desktop Case
DMI Memory Sockets (Total/Free) 4 / 0


------------------------------------------------------------------------------------------------------------------------

The names of actual companies and products mentioned herein may be the trademarks of their respective owners.

The text content is as above. Just read a few key lines from it and save them as another text file, (such as CPU Type, Video Adapter, Primary IP Address.)
Floor 2 Posted 2008-08-21 20:51 ·  中国 湖北 武汉 联通
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline
Floor 3 Posted 2008-08-21 21:01 ·  中国 江苏 苏州 电信
银牌会员
★★★
Credits 1,608
Posts 780
Joined 2007-10-07 10:19
18-year member
UID 99089
Gender Male
Status Offline

@ECHO OFF
for /f "delims=" %%i in ('findstr/i "cpu ip 显示卡" a.txt') do (
echo %%i >>c.txt
)
start "" c.txt
Floor 4 Posted 2008-08-21 21:08 ·  中国 广东 深圳 电信
初级用户
Credits 31
Posts 15
Joined 2007-11-26 15:40
18-year member
UID 103825
Gender Male
Status Offline
Thanks for the reply, but it still didn't work.
Floor 5 Posted 2008-08-21 21:13 ·  中国 江苏 苏州 电信
银牌会员
★★★
Credits 1,608
Posts 780
Joined 2007-10-07 10:19
18-year member
UID 99089
Gender Male
Status Offline
If it didn't work then that's your problem. Save your earlier file as a.txt.
Then create the batch file I wrote above in your current directory. Finally run it once and see whether you can get the result you want.
Floor 6 Posted 2008-08-21 21:17 ·  中国 广东 深圳 电信
初级用户
Credits 31
Posts 15
Joined 2007-11-26 15:40
18-year member
UID 103825
Gender Male
Status Offline
I made a basic mistake, thanks~!
Floor 7 Posted 2008-08-21 21:21 ·  中国 重庆 九龙坡区 电信
初级用户
Credits 33
Posts 16
Joined 2008-08-21 20:58
17-year member
UID 123805
Gender Male
Status Offline
@echo off
findstr "CPU" a.txt
findstr "graphics card" a.txt
findstr "IP" a.txt
Floor 8 Posted 2008-08-22 06:11 ·  中国 山东 淄博 联通
银牌会员
★★★
Credits 1,604
Posts 646
Joined 2008-04-13 23:39
18-year member
UID 115804
Gender Male
Status Offline
findstr /i "cpu ip 显示卡" a.txt>c.txt
start c.txt
I use for every day, looks like my thinking got fixed on it. ^_^
心绪平和,眼藏静谧,无比安稳的火... Purification of soul...Just a false...^_^
Forum Jump: