|
baikaifang
初级用户
 
积分 68
发帖 32
注册 2006-10-20
状态 离线
|
『楼 主』:
[求助]提取文件中格式类似的字符[有点难坛论没见过的]
使用 LLM 解释/回答一下
提取文件中格式类似的字符,这些文件并不在同一个目录
先说明一下:
需要提取内容的文件,分布在不同的文件夹内.并且所在的文件夹层次也不一样. 同时还要在输出的内容后面追加该文件的路径
这是文件夹结构:
C:\SRS-DRV
├─3
│ ├─1
│ │ └─O
│ ├─2
│ └─3
├─A
│ ├─1
│ ├─2
│ ├─3
│ ├─4
│ ├─5
│ ├─6
│ ├─7
│ └─8
├─AD
│ ├─1
│ ├─2
│ ├─3
│ ├─4
│ ├─5
│ ├─6
│ │ └─C
│ ├─7
│ ├─8
│ ├─9
│ └─A
├─AM
├─AR
├─AT
├─AU
│ ├─1
│ ├─2
│ └─3
├─C
├─D
│ ├─1
│ ├─2
│ └─3
├─E
├─H
│ ├─1
│ │ └─R
│ ├─2
│ ├─3
│ ├─4
│ ├─5
│ ├─6
│ │ └─2k3
│ ├─7
│ └─8
├─I
│ ├─1
│ ├─2
│ ├─3
│ ├─4
│ ├─5
│ └─6
├─IN
│ ├─1
│ │ └─O
│ └─2
│ └─winnt
│ └─x86
├─IT
├─J
│ ├─1
│ └─2
├─L
│ ├─1
│ ├─2
│ ├─3
│ ├─4
│ └─5
├─M
│ └─O
├─N
│ ├─123
│ ├─4
│ │ ├─I
│ │ └─R
│ ├─4INTEL
│ │ ├─I
│ │ └─R
│ ├─590SLI
│ │ ├─I
│ │ └─R
│ └─TM
├─P
│ ├─1
│ ├─2
│ │ └─A
│ ├─3
│ ├─4
│ ├─5
│ ├─6
│ ├─7
│ ├─8
│ └─9
├─Q
│ ├─1
│ ├─2
│ ├─3
│ └─4
├─S
│ ├─1
│ ├─2
│ ├─3
│ ├─4
│ ├─5
│ │ └─A
│ ├─6
│ ├─7
│ │ └─A
│ ├─8
│ ├─9
│ ├─A
│ ├─B
│ └─C
├─SI
│ ├─1
│ ├─2
│ └─3
├─V
│ ├─1
│ ├─2
│ └─3
└─VM
基本上每个文件夹下面都有一个扩展名为.INF的文件,如果那个INF文件中有和下面红色部分类似的内容就将它输出到1.TXT中(有的文件里有多行这样的,要全部都输出),并且将该文件的路径追加到输出文本的后面。(如果某个文件中有多处符合条件的,就全部输出,并且在每一行后面添加该文件的路径,例如后面几行蓝色的)
例如:
PCI\VEN_13C1&DEV_1000=C:\SRS-DRV\3\3\oemsetup3.inf
PCI\VEN_1191&DEV_0002&SUBSYS_00021191=C:\SRS-DRV\A\1\Aec6210.inf
PCI\VEN_1191&DEV_0006&SUBSYS_00061191&REV_01=C:\SRS-DRV\A\2\Aec6260.inf
PCI\VEN_1022&DEV_7409= C:\SRS-DRV\AM\AMDEIDE.inf
PCI\VEN_1022&DEV_7411= C:\SRS-DRV\AM\AMDEIDE.inf
PCI\VEN_1022&DEV_7441= C:\SRS-DRV\AM\AMDEIDE.inf
PCI\VEN_1022&DEV_7469= C:\SRS-DRV\AM\AMDEIDE.inf
前面的部分是从文件里面提出来的,等号后面是提取内容的文件的路径.
要提取的内容有几个相似的特点:
1 都是以PCI\VEN开头 .(注意:这里是指我要提取的内容是以PCI\VEN开头,并非该内容所在的行是PCI\VEN开头.只需要PCI\VEN之间包含一个"\"的内容,超过一个"\"以上的都不是需要的)
2 内容中有两种分隔符"_"和"&",并且分隔符的数量不一样.
下面的链接页面的文件,是上面制作1.TXT文件用到的,上面的目录树结构就是该链接文件的.
http://driverpacks.net/DriverPacks/download.php?pag=m
所用到的文件上面链接页面有下载,我的等级太低了,现在好像还无法上传附件!
在这里先感谢各位大侠们了.
希望用批处理实现上面功能的初衷:
原帖引用之龙帝国论坛 由 eyeshare 于 07-5-3 11:07 发表
封装前加载sata raid scsi 驱动的心得,可以不用不改的srs
做ghost系统我觉得最重要的就是电源模式的判断和准确加载srs 驱动,现在电源模式的判断已经有了很好的解决办法,现在最主要的问题就在于srs 的驱动怎样在封装前加载,和最小化安装的时候卸载多余的驱动,加快系统启动速度。其实参考微软的部署文档就可以了。下面我来说说我的方法(封装前其他的步骤我就不多说了 如:更改电源模式等)
1,收集需要的srs驱动,可以直接下载dps 的massstorage 驱动。
http://www.driverpacks.net/DriverPacks/download.php?pag=m
2,解压驱动到c:\drivers 。
3,编辑sysprep.ini 加入以下内容
InstallFilesPath=C:\sysprep\i386
PCI\VEN_1022&DEV_7469=c:\drivers\m\am\AMDEIDE.inf
PCI\VEN_1002&DEV_4349=c:\drivers\m\at\atiide.inf
PCI\VEN_10B9&DEV_5215=c:\drivers\m\au\1\ALIIDE.INF
PCI\VEN_10B9&DEV_5219=c:\drivers\m\au\1\ALIIDE.INF
PCI\VEN_10B9&DEV_5229=c:\drivers\m\au\1\ALIIDE.INF
PCI\VEN_10B9&DEV_5228=c:\drivers\m\au\2\m5228.INF
PCI\VEN_10B9&DEV_5281=c:\drivers\m\au\2\m5281.inf
PCI\VEN_10B9&DEV_5287=c:\drivers\m\au\3\ulisata.inf
PCI\VEN_10B9&DEV_5288=c:\drivers\m\au\4\ULISATA.INF
PCI\VEN_10B9&DEV_5289=c:\drivers\m\au\5\ULISATA.INF
PCI\VEN_8086&DEV_2652&CC_0104=c:\drivers\m\in\1\iastor.inf
PCI\VEN_8086&DEV_27C3&CC_0104=c:\drivers\m\in\1\iastor.inf
PCI\VEN_8086&DEV_2682&CC_0104=c:\drivers\m\in\1\iastor.inf
PCI\VEN_8086&DEV_27C6&CC_0104=c:\drivers\m\in\1\iastor.inf
PCI\VEN_8086&DEV_2822&CC_0104=c:\drivers\m\in\1\iastor.inf
PCI\VEN_8086&DEV_2652&CC_0106=c:\drivers\m\in\1\iaahci.inf
PCI\VEN_8086&DEV_2653&CC_0106=c:\drivers\m\in\1\iaahci.inf
PCI\VEN_8086&DEV_27C1&CC_0106=c:\drivers\m\in\1\iaahci.inf
PCI\VEN_8086&DEV_27C5&CC_0106=c:\drivers\m\in\1\iaahci.inf
PCI\VEN_8086&DEV_2681&CC_0106=c:\drivers\m\in\1\iaahci.inf
PCI\VEN_8086&DEV_2821&CC_0106=c:\drivers\m\in\1\iaahci.inf
PCI\VEN_8086&DEV_24DF&CC_0104=c:\drivers\m\in\1\O\iastor.inf
PCI\VEN_8086&DEV_25B0&CC_0104=c:\drivers\m\in\1\O\iastor.inf
PCI\VEN_10DE&DEV_008E=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_00D5=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_00EE=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_00E3=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_0036=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_003E=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_0054=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_0055=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_0266=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_0267=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_036F=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_037E=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_037F=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_03F6=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_03F7=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_03E7=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_1039&DEV_0181=c:\drivers\M\SI\1\SISRaid1.INF
PCI\VEN_1039&DEV_0180=c:\drivers\M\SI\2\SISRaid.INF
PCI\VEN_1039&DEV_0182=c:\drivers\M\SI\3\SISRaid2.INF
PCI\VEN_1106&DEV_3349&CC_0104=c:\drivers\M\V\1\VIAMRAID.INF
PCI\VEN_1106&DEV_6287&CC_0106=c:\drivers\M\V\1\VIAMRAID.INF
PCI\VEN_1106&DEV_0591&CC_0104=c:\drivers\M\V\1\VIAMRAID.INF
PCI\VEN_1106&DEV_3249&CC_0104=c:\drivers\M\V\1\VIAMRAID.INF
PCI\VEN_1106&DEV_3149&CC_0104=c:\drivers\M\V\1\VIAMRAID.INF
PCI\VEN_1106&DEV_3164&CC_0104=c:\drivers\M\V\1\VIAMRAID.INF
PCI\VEN_1106&DEV_0581&CC_0104=c:\drivers\M\V\1\VIAMRAID.INF
PCI\VEN_1106&DEV_7372&CC_0104=c:\drivers\M\V\1\VIAMRAID.INF
PCI\VEN_1106&DEV_4149=c:\drivers\M\V\2\viapide.inf
PCI\VEN_1106&DEV_0571=c:\drivers\M\V\3\vminiide.inf
PCI\VEN_1106&DEV_3149&CC_0101=c:\drivers\M\V\3\vminiide.inf
PCI\VEN_1106&DEV_0591&CC_0101=c:\drivers\M\V\3\vminiide.inf
PCI\VEN_1106&DEV_5337&CC_0101=c:\drivers\M\V\3\vminiide.inf
PCI\VEN_1106&DEV_3349&CC_0101=c:\drivers\M\V\3\vminiide.inf
PCI\VEN_1106&DEV_5287&CC_0101=c:\drivers\M\V\3\vminiide.inf
PCI\VEN_1106&DEV_3164&CC_0101=c:\drivers\M\V\3\vminiide.inf
PCI\VEN_1106&DEV_0581&CC_0101=c:\drivers\M\V\3\vminiide.inf
PCI\VEN_1106&DEV_5324&CC_0101=c:\drivers\M\V\3\vminiide.inf
PCI\VEN_104B&DEV_1040=c:\drivers\M\VM\vmscsi.inf
这个是我加载的驱动 包括nforece intel via sis ali amd 的sata驱动,如果还需要加载其他驱动可以参考驱动包内的 DriverPack_MassStorage_wnt5_x86-32.ini 文件。
4,在c:\sysprep 目录下建立 i386\$oem$目录 ,在c:\sysprep\i386\$oem$ 中建立cmdlines.txt 文件,在文件中加入
"c:\sysprep\sysprep -clean"
这样就会在最小化安装的过程中禁用所有因为在目标计算机上不存在而未安装的大量存储控制器。
5,最后执行sysprep进行封装,在封装的过程中,系统会自动安装 srs驱动。在最小化安装的时候会删除多余的驱动。
这样做的好处是自己可以控制加载的驱动更符合自己的需要,坏处就是需要手动添加比较麻烦。
引用文章原贴地址 http://bbs.mscode.cc/thread-51438-1-2.html
Last edited by baikaifang on 2007-6-3 at 08:04 PM ]
Extract characters with similar formats from files, and these files are not in the same directory
First, let's explain:
The files from which you need to extract content are distributed in different folders. And the levels of the folders where they are located are also different. At the same time, you also need to append the path of the file to the output content.
Here is the folder structure:
C:\SRS-DRV
├─3
│ ├─1
│ │ └─O
│ ├─2
│ └─3
├─A
│ ├─1
│ ├─2
│ ├─3
│ ├─4
│ ├─5
│ ├─6
│ ├─7
│ └─8
├─AD
│ ├─1
│ ├─2
│ ├─3
│ ├─4
│ ├─5
│ ├─6
│ │ └─C
│ ├─7
│ ├─8
│ ├─9
│ └─A
├─AM
├─AR
├─AT
├─AU
│ ├─1
│ ├─2
│ └─3
├─C
├─D
│ ├─1
│ ├─2
│ └─3
├─E
├─H
│ ├─1
│ │ └─R
│ ├─2
│ ├─3
│ ├─4
│ ├─5
│ ├─6
│ │ └─2k3
│ ├─7
│ └─8
├─I
│ ├─1
│ ├─2
│ ├─3
│ ├─4
│ ├─5
│ └─6
├─IN
│ ├─1
│ │ └─O
│ └─2
│ └─winnt
│ └─x86
├─IT
├─J
│ ├─1
│ └─2
├─L
│ ├─1
│ ├─2
│ ├─3
│ ├─4
│ └─5
├─M
│ └─O
├─N
│ ├─123
│ ├─4
│ │ ├─I
│ │ └─R
│ ├─4INTEL
│ │ ├─I
│ │ └─R
│ ├─590SLI
│ │ ├─I
│ │ └─R
│ └─TM
├─P
│ ├─1
│ ├─2
│ │ └─A
│ ├─3
│ ├─4
│ ├─5
│ ├─6
│ ├─7
│ ├─8
│ └─9
├─Q
│ ├─1
│ ├─2
│ ├─3
│ └─4
├─S
│ ├─1
│ ├─2
│ ├─3
│ ├─4
│ ├─5
│ │ └─A
│ ├─6
│ ├─7
│ │ └─A
│ ├─8
│ ├─9
│ ├─A
│ ├─B
│ └─C
├─SI
│ ├─1
│ ├─2
│ └─3
├─V
│ ├─1
│ ├─2
│ └─3
└─VM
Basically, there is an INF file with the extension .INF under each folder. If there is content similar to the red part below in that INF file, output it to 1.TXT (if there are multiple lines like this in a file, all should be output), and append the path of the file to the output content. (If a file has multiple matching places, output all of them and add the path of the file at the end of each line, for example, the blue parts below.)
For example:
PCI\VEN_13C1&DEV_1000=C:\SRS-DRV\3\3\oemsetup3.inf
PCI\VEN_1191&DEV_0002&SUBSYS_00021191=C:\SRS-DRV\A\1\Aec6210.inf
PCI\VEN_1191&DEV_0006&SUBSYS_00061191&REV_01=C:\SRS-DRV\A\2\Aec6260.inf
PCI\VEN_1022&DEV_7409= C:\SRS-DRV\AM\AMDEIDE.inf
PCI\VEN_1022&DEV_7411= C:\SRS-DRV\AM\AMDEIDE.inf
PCI\VEN_1022&DEV_7441= C:\SRS-DRV\AM\AMDEIDE.inf
PCI\VEN_1022&DEV_7469= C:\SRS-DRV\AM\AMDEIDE.inf
The part in front is extracted from the file, and the part after the equal sign is the path of the file from which the content is extracted.
The content to be extracted has several similar characteristics:
1. All start with PCI\VEN. (Note: Here it means that the content I want to extract starts with PCI\VEN, not that the line where this content is located starts with PCI\VEN. Only the content between PCI\VEN and containing one "\" is needed, and content with more than one "\" is not needed.)
2. There are two separators "_" and "&" in the content, and the number of separators is different.
The files on the page of the following link are used to make the 1.TXT file, and the directory tree structure above is that of the link file.
http://driverpacks.net/DriverPacks/download.php?pag=m
The files used are downloadable on the above link page. I have too low a level and seem unable to upload attachments for now!
Thank you all here in advance, great experts.
The original intention of hoping to implement the above function with a batch script:
The original post is quoted from the Dragon Empire Forum, posted by eyeshare on 07-5-3 11:07
The experience of loading SATA RAID SCSI drivers before encapsulation, which can be used without modification of SRS
I think the most important thing in making a ghost system is the judgment of the power mode and the accurate loading of SRS drivers. Now the judgment of the power mode has a very good solution, and the most main problem is now how to load the SRS drivers before encapsulation and uninstall the redundant drivers during the minimal installation to speed up the system boot speed. In fact, referring to Microsoft's deployment documents can solve it. Now I will talk about my method (I won't say much about other steps before encapsulation, such as changing the power mode, etc.)
1. Collect the required SRS drivers, which can be directly downloaded from the massstorage drivers of DPS.
http://www.driverpacks.net/DriverPacks/download.php?pag=m
2. Extract the drivers to c:\drivers.
3. Edit sysprep.ini and add the following content
InstallFilesPath=C:\sysprep\i386
PCI\VEN_1022&DEV_7469=c:\drivers\m\am\AMDEIDE.inf
PCI\VEN_1002&DEV_4349=c:\drivers\m\at\atiide.inf
PCI\VEN_10B9&DEV_5215=c:\drivers\m\au\1\ALIIDE.INF
PCI\VEN_10B9&DEV_5219=c:\drivers\m\au\1\ALIIDE.INF
PCI\VEN_10B9&DEV_5229=c:\drivers\m\au\1\ALIIDE.INF
PCI\VEN_10B9&DEV_5228=c:\drivers\m\au\2\m5228.INF
PCI\VEN_10B9&DEV_5281=c:\drivers\m\au\2\m5281.inf
PCI\VEN_10B9&DEV_5287=c:\drivers\m\au\3\ulisata.inf
PCI\VEN_10B9&DEV_5288=c:\drivers\m\au\4\ULISATA.INF
PCI\VEN_10B9&DEV_5289=c:\drivers\m\au\5\ULISATA.INF
PCI\VEN_8086&DEV_2652&CC_0104=c:\drivers\m\in\1\iastor.inf
PCI\VEN_8086&DEV_27C3&CC_0104=c:\drivers\m\in\1\iastor.inf
PCI\VEN_8086&DEV_2682&CC_0104=c:\drivers\m\in\1\iastor.inf
PCI\VEN_8086&DEV_27C6&CC_0104=c:\drivers\m\in\1\iastor.inf
PCI\VEN_8086&DEV_2822&CC_0104=c:\drivers\m\in\1\iastor.inf
PCI\VEN_8086&DEV_2652&CC_0106=c:\drivers\m\in\1\iaahci.inf
PCI\VEN_8086&DEV_2653&CC_0106=c:\drivers\m\in\1\iaahci.inf
PCI\VEN_8086&DEV_27C1&CC_0106=c:\drivers\m\in\1\iaahci.inf
PCI\VEN_8086&DEV_27C5&CC_0106=c:\drivers\m\in\1\iaahci.inf
PCI\VEN_8086&DEV_2681&CC_0106=c:\drivers\m\in\1\iaahci.inf
PCI\VEN_8086&DEV_2821&CC_0106=c:\drivers\m\in\1\iaahci.inf
PCI\VEN_8086&DEV_24DF&CC_0104=c:\drivers\m\in\1\O\iastor.inf
PCI\VEN_8086&DEV_25B0&CC_0104=c:\drivers\m\in\1\O\iastor.inf
PCI\VEN_10DE&DEV_008E=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_00D5=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_00EE=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_00E3=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_0036=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_003E=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_0054=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_0055=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_0266=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_0267=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_036F=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_037E=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_037F=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_03F6=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_03F7=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_10DE&DEV_03E7=c:\drivers\m\N\TM\nvatabus.inf
PCI\VEN_1039&DEV_0181=c:\drivers\M\SI\1\SISRaid1.INF
PCI\VEN_1039&DEV_0180=c:\drivers\M\SI\2\SISRaid.INF
PCI\VEN_1039&DEV_0182=c:\drivers\M\SI\3\SISRaid2.INF
PCI\VEN_1106&DEV_3349&CC_0104=c:\drivers\M\V\1\VIAMRAID.INF
PCI\VEN_1106&DEV_6287&CC_0106=c:\drivers\M\V\1\VIAMRAID.INF
PCI\VEN_1106&DEV_0591&CC_0104=c:\drivers\M\V\1\VIAMRAID.INF
PCI\VEN_1106&DEV_3249&CC_0104=c:\drivers\M\V\1\VIAMRAID.INF
PCI\VEN_1106&DEV_3149&CC_0104=c:\drivers\M\V\1\VIAMRAID.INF
PCI\VEN_1106&DEV_3164&CC_0104=c:\drivers\M\V\1\VIAMRAID.INF
PCI\VEN_1106&DEV_0581&CC_0104=c:\drivers\M\V\1\VIAMRAID.INF
PCI\VEN_1106&DEV_7372&CC_0104=c:\drivers\M\V\1\VIAMRAID.INF
PCI\VEN_1106&DEV_4149=c:\drivers\M\V\2\viapide.inf
PCI\VEN_1106&DEV_0571=c:\drivers\M\V\3\vminiide.inf
PCI\VEN_1106&DEV_3149&CC_0101=c:\drivers\M\V\3\vminiide.inf
PCI\VEN_1106&DEV_0591&CC_0101=c:\drivers\M\V\3\vminiide.inf
PCI\VEN_1106&DEV_5337&CC_0101=c:\drivers\M\V\3\vminiide.inf
PCI\VEN_1106&DEV_3349&CC_0101=c:\drivers\M\V\3\vminiide.inf
PCI\VEN_1106&DEV_5287&CC_0101=c:\drivers\M\V\3\vminiide.inf
PCI\VEN_1106&DEV_3164&CC_0101=c:\drivers\M\V\3\vminiide.inf
PCI\VEN_1106&DEV_0581&CC_0101=c:\drivers\M\V\3\vminiide.inf
PCI\VEN_1106&DEV_5324&CC_0101=c:\drivers\M\V\3\vminiide.inf
PCI\VEN_104B&DEV_1040=c:\drivers\M\VM\vmscsi.inf
These are the drivers I loaded, including SATA drivers of nforece, intel, via, sis, ali, amd. If other drivers need to be loaded, you can refer to the DriverPack_MassStorage_wnt5_x86-32.ini file in the driver pack.
4. Create the i386\$oem$ directory under the c:\sysprep directory, and create the cmdlines.txt file in c:\sysprep\i386\$oem$, and add the following content in the file
"c:\sysprep\sysprep -clean"
In this way, all mass storage controllers that are not installed because they do not exist on the target computer will be disabled during the minimal installation process.
5. Finally, execute sysprep to encapsulate. During the encapsulation process, the system will automatically install the SRS drivers. During the minimal installation, the redundant drivers will be deleted.
The advantage of this is that you can control the loaded drivers according to your own needs, and the disadvantage is that it is more troublesome to add manually.
Original post address of the quoted article http://bbs.mscode.cc/thread-51438-1-2.html
Last edited by baikaifang on 2007-6-3 at 08:04 PM ]
|
|
2007-6-2 23:23 |
|
|
namejm
荣誉版主
       batch fan
积分 5226
发帖 1737
注册 2006-3-10 来自 成都
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
放了那么久都没人理睬,我来试试看。
先问问楼主:"前面的部分是从文件里面提出来的",这个文件到底什么样?你最好把它作为附件发出来。
It has been left for so long without anyone paying attention, so I'll give it a try.
First, ask the original poster: "The previous part was extracted from a file". What exactly does this file look like? You'd better send it as an attachment.
|

尺有所短,寸有所长,学好CMD没商量。
考虑问题复杂化,解决问题简洁化。 |
|
2007-6-3 15:09 |
|
|
electronixtar
铂金会员
      
积分 7493
发帖 2672
注册 2005-9-2
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
不要拿难来吓人
findstr /r /i "PCI\\VEN.*&DEV_"
Don't use difficulty to scare people
findstr /r /i "PCI\\VEN.*&DEV_"
|

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>" |
|
2007-6-3 15:14 |
|
|
wudixin96
银牌会员
    
积分 1928
发帖 931
注册 2007-1-6
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
偶试过了。他的文件夹下的inf文件里的内容极不规则的。
PCI\\VEN.*&DEV前时不时有空格等出现。
要过滤好几次才能提出来。
希望namejm、electronixtar等老大能出个效率高的。期待……
I have tried. The content in the inf file under his folder is extremely irregular.
There are spaces and so on from time to time before PCI\\VEN.*&DEV.
It needs to be filtered several times to extract it.
Hope that seniors like namejm, electronixtar can come up with a more efficient one. Looking forward...
|
|
2007-6-3 15:20 |
|
|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
不明白怎么1.txt文件里面的=号后面的文件路径和上面文件夹的树形结构不一样了,汗。。
@echo off
for /f "delims=: tokens=1*" %%a in ('findstr /sirc:"^PCI\\\VEN_....&" C:\SRS-DRV\*.inf') do (
echo\%%b=%%a>>1.txt
)
start 1.txt
I don't understand why the file path after the = sign in the 1.txt file is different from the tree structure of the folder above. Sweat.
@echo off
for /f "delims=: tokens=1*" %%a in ('findstr /sirc:"^PCI\\\VEN_....&" C:\SRS-DRV\*.inf') do (
echo\%%b=%%a>>1.txt
)
start 1.txt
|
|
2007-6-3 15:39 |
|
|
wudixin96
银牌会员
    
积分 1928
发帖 931
注册 2007-1-6
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
PCI\\\VEN为什么有三个\。不是两个吗?
而且inf文件里的结构是这样的%DEVICE_DESCRIPTION% = Install, PCI\VEN_13C1&DEV_1002&SUBSYS_100213C1
并不是以PCI\VEN打头的。
不好意思。想复杂了。多余了。
Last edited by wudixin96 on 2007-6-3 at 04:12 PM ]
PCI\\\VEN why are there three \. Isn't it two?
And the structure in the inf file is like this %DEVICE_DESCRIPTION% = Install, PCI\VEN_13C1&DEV_1002&SUBSYS_100213C1
It's not starting with PCI\VEN.
Sorry. Thought too much. Excessive.
Last edited by wudixin96 on 2007-6-3 at 04:12 PM ]
|
|
2007-6-3 15:44 |
|
|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
Originally posted by wudixin96 at 2007-6-3 15:44:
PCI\\\VEN为什么有三个\。不是两个吗?
而且inf文件里的结构是这样的%DEVICE_DESCRIPTION% = Install, PCI\VEN_13C1&DEV_1002&SUBSYS_100213C1
并不是以PCI\VEN打头的。
第一个\对第二个\取消转义,得到一个“真实”的\,然后这个\去取消第三个\的特殊意义。(我是这样理解的)
至于不是以PCI\VEN打头,我是看楼主的说明这样写的:
要提取的内容有几个相似的特点:
1 都是以PCI\VEN开头.
Originally posted by wudixin96 at 2007-6-3 15:44:
Why are there three \ in PCI\\\VEN? Isn't it two?
Moreover, the structure in the inf file is like this %DEVICE_DESCRIPTION% = Install, PCI\VEN_13C1&DEV_1002&SUBSYS_100213C1
It doesn't start with PCI\VEN.
The first \ cancels the escape of the second \, getting a "real" \, and then this \ cancels the special meaning of the third \. (This is how I understand it)
As for not starting with PCI\VEN, I am looking at the owner's explanation written like this:
The content to be extracted has several similar characteristics:
1 All start with PCI\VEN.
|
|
2007-6-3 15:49 |
|
|
baikaifang
初级用户
 
积分 68
发帖 32
注册 2006-10-20
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
Originally posted by namejm at 2007-6-3 15:09:
放了那么久都没人理睬,我来试试看。
先问问楼主:"前面的部分是从文件里面提出来的",这个文件到底什么样?你最好把它作为附件发出来。
所用到的文件,就是一楼最下面那个链接下载的呀.
Originally posted by namejm at 2007-6-3 15:09:
No one paid any attention after being left for so long, so I'll give it a try.
First, I would like to ask the original poster: "The previous part was extracted from the file", what exactly does this file look like? You'd better post it as an attachment.
The file used is the one downloaded from the link at the bottom of the first floor.
|
|
2007-6-3 19:07 |
|
|
baikaifang
初级用户
 
积分 68
发帖 32
注册 2006-10-20
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
Originally posted by electronixtar at 2007-6-3 15:14:
不要拿难来吓人
findstr /r /i "PCI\\VEN.*&DEV_"
electronixtar 大侠,我只会一些简单的批处理,把贴子标题写成那样,只希望能得到各位大侠的帮忙,请别见怪!
Last edited by baikaifang on 2007-6-3 at 07:48 PM ]
Originally posted by electronixtar at 2007-6-3 15:14:
Don't use difficulty to scare people
findstr /r /i "PCI\\VEN.*&DEV_"
Great expert electronixtar, I only know some simple batch processing. I wrote the post title like that just to hope to get the help from all great experts. Please don't take it to heart!
Last edited by baikaifang on 2007-6-3 at 07:48 PM ]
|
|
2007-6-3 19:10 |
|
|
baikaifang
初级用户
 
积分 68
发帖 32
注册 2006-10-20
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
Originally posted by wudixin96 at 2007-6-3 15:44:
PCI\\\VEN为什么有三个\。不是两个吗?
而且inf文件里的结构是这样的%DEVICE_DESCRIPTION% = Install, PCI\VEN_13C1&DEV_1002&SUBSYS_100213C1
并不是以PCI\VEN打头的 ...
不好意思,是我表达的模糊了一点,我所指的以PCI\VEN开头,是我要提取的内容都是PCI\VEN开头的,并不是在以PCI\VEN开头所在的行.
Originally posted by wudixin96 at 2007-6-3 15:44:
Why are there three backslashes in PCI\\\VEN? Shouldn't there be two?
Also, the structure in the INF file is like this: %DEVICE_DESCRIPTION% = Install, PCI\VEN_13C1&DEV_1002&SUBSYS_100213C1
It's not starting with PCI\VEN...
I'm sorry, my expression was a bit vague. What I meant by starting with PCI\VEN is that all the content I need to extract starts with PCI\VEN, not that it's in the line starting with PCI\VEN.
|
|
2007-6-3 19:23 |
|
|
baikaifang
初级用户
 
积分 68
发帖 32
注册 2006-10-20
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
Originally posted by lxmxn at 2007-6-3 15:39:
不明白怎么1.txt文件里面的=号后面的文件路径和上面文件夹的树形结构不一样了,汗。。
@echo off
for /f "delims=: tokens=1*" %%a in ('findstr /s ...
不好意思,是我没注意到,已重新修改一楼贴子了.:D
Originally posted by lxmxn at 2007-6-3 15:39:
I don't understand why the file path after the = sign in the 1.txt file is different from the tree structure of the folder above. Sweat.
@echo off
for /f "delims=: tokens=1*" %%a in ('findstr /s ...
I'm sorry, I didn't notice. I have re-modified the first post. :D
|
|
2007-6-3 19:32 |
|
|
baikaifang
初级用户
 
积分 68
发帖 32
注册 2006-10-20
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
等了一天了没人顶,自己来一下
Waited all day and no one bumped it, so I'll do it myself
|
|
2007-6-4 16:28 |
|
|
terse
银牌会员
    
积分 2404
发帖 946
注册 2005-9-8
状态 离线
|
『第 13 楼』:
使用 LLM 解释/回答一下
lxmxn版主不是帮写好了?
Is the version by moderator lxmxn not already prepared?
|
|
2007-6-4 16:34 |
|
|
lxmxn
版主
       
积分 11386
发帖 4938
注册 2006-7-23
状态 离线
|
『第 14 楼』:
使用 LLM 解释/回答一下
Originally posted by baikaifang at 2007-6-4 16:28:
等了一天了没人顶,自己来一下
不要怪别人没有看,你的意思根本没有说清楚,所以大家也懒得看了。
说不清楚举个例子出来,不要说一些有歧义的话。
Originally posted by baikaifang at 2007-6-4 16:28:
Waited all day and no one bumped it, so I'll do it myself
Don't blame others for not reading. Your meaning wasn't clear at all, so everyone is too lazy to read.
If you can't explain clearly, give an example. Don't say ambiguous things.
|
|
2007-6-4 16:38 |
|
|
terse
银牌会员
    
积分 2404
发帖 946
注册 2005-9-8
状态 离线
|
『第 15 楼』:
使用 LLM 解释/回答一下
@echo off
for /f "tokens=1* delims=:" %%i in ('findstr /risc:"PCI\\\VEN_....&" *.inf') do (
echo %%j=%%~fdpi >>123.txt
)
pause
在lxmxn版主的写的上面多个路径 是不是你要的?
@echo off
for /f "tokens=1* delims=:" %%i in ('findstr /risc:"PCI\\\VEN_....&" *.inf') do (
echo %%j=%%~fdpi >>123.txt
)
pause
Is this the multiple paths written by version master lxmxn?
|
|
2007-6-4 18:03 |
|