|
2#
楼主 |
发表于 2011-10-4 21:12:24
|
只看该作者
今天完成了CMD的批处理部分
刚调试grub4dos的时候,更新了如下的代码:
代码如下:- @echo off&setlocal enabledelayedexpansion
- ::计算路径长度,变量保存为fd变量截取用
- :loop
- set /a length+=1
- if not "!cd:~%length%,1!" equ "" goto :loop
- set /a length+=1
- set fd=
- set sd=
- if exist %cd%\srs\list.txt del %cd%\srs\list.txt
- for /f "usebackq" %%i in (`dir %cd%\srs\txtsetup.oem /b /s`) do (
- for /f "usebackq delims=," %%j in (`find /i "PCI\VEN" %%i`) do (
- set fd=%%i
- set fd=!fd:~%length%,-12!
- set fd=!fd:\=/!
- set sd=%%j
- set sd=!sd:~6,21!
- echo !fd!,!sd!,>>%cd%\srs\list.txt
- )
- )
复制代码 目录结构:- D:\WINPE\SRS
- │ list.txt
- │
- ├─amd
- │ └─SB78
- │ ahcix86
- │ ahcix86.cat
- │ ahcix86.inf
- │ ahcix86.msi
- │ ahcix86.sys
- │ txtsetup.oe
- │
- ├─intel
- │ ├─478
- │ ├─775
- │ │ iaAHCI.cat
- │ │ iaAHCI.inf
- │ │ iaStor.cat
- │ │ iaStor.inf
- │ │ IaStor.sys
- │ │ TXTSETUP.OE
- │ │
- │ └─SNB
- │ F6Readme.tx
- │ iaahci.cat
- │ iaAHCI.inf
- │ iastor.cat
- │ iaStor.inf
- │ iaStor.sys
- │ license.txt
- │ TXTSETUP.OE
- │
- ├─nvidia
- │ disk1
- │ nvgts.sys
- │ nvraid.cat
- │ nvraidco.dll
- │ NvRCoDa.dll
- │ NvRCoDe.dll
- │ NvRCoEng.dll
- │ NvRCoEnu.dll
- │ NvRCoEs.dll
- │ NvRCoEsm.dll
- │ NvRCoFi.dll
- │ NvRCoFr.dll
- │ NvRCoIt.dll
- │ NvRCoJa.dll
- │ NvRCoKo.dll
- │ NvRCoNl.dll
- │ NvRCoNo.dll
- │ NvRCoPtb.dll
- │ NvRCoRu.dll
- │ NvRCoSv.dll
- │ NvRCoZhc.dll
- │ NvRCoZht.dll
- │ nvrd32.inf
- │ nvrd32.sys
- │ txtsetup.oem
- │
- ├─uli
- └─via
复制代码 生成的list.txt内容
- srs/amd/SB78/,---- D:\WINPE\SRS\AMD,
- srs/amd/SB78/,PCI\VEN_1002&DEV_4392,
- srs/amd/SB78/,PCI\VEN_1002&DEV_4391,
- srs/amd/SB78/,PCI\VEN_1002&DEV_4393,
- srs/amd/SB78/,PCI\VEN_1022&DEV_7802,
- srs/amd/SB78/,PCI\VEN_1022&DEV_7801,
- srs/amd/SB78/,PCI\VEN_1022&DEV_7803,
- srs/intel/775/,---- D:\WINPE\SRS\INT,
- srs/intel/775/,PCI\VEN_8086&DEV_2681,
- srs/intel/775/,PCI\VEN_8086&DEV_27C1,
- srs/intel/775/,PCI\VEN_8086&DEV_27C5,
- srs/intel/775/,PCI\VEN_8086&DEV_2821,
- srs/intel/775/,PCI\VEN_8086&DEV_2829,
- srs/intel/775/,PCI\VEN_8086&DEV_2922,
- srs/intel/775/,PCI\VEN_8086&DEV_2929,
- srs/intel/775/,PCI\VEN_8086&DEV_3A02,
- srs/intel/775/,PCI\VEN_8086&DEV_3A22,
- srs/intel/775/,PCI\VEN_8086&DEV_3B29,
- srs/intel/775/,PCI\VEN_8086&DEV_3B2F,
- srs/intel/775/,PCI\VEN_8086&DEV_3B22,
- srs/intel/775/,PCI\VEN_8086&DEV_2682,
- srs/intel/775/,PCI\VEN_8086&DEV_27C3,
- srs/intel/775/,PCI\VEN_8086&DEV_27C6,
- srs/intel/775/,PCI\VEN_8086&DEV_2822,
- srs/intel/775/,PCI\VEN_8086&DEV_282A,
- srs/intel/SNB/,---- D:\WINPE\SRS\INT,
- srs/intel/SNB/,PCI\VEN_8086&DEV_27C1,
- srs/intel/SNB/,PCI\VEN_8086&DEV_27C5,
- srs/intel/SNB/,PCI\VEN_8086&DEV_2922,
- srs/intel/SNB/,PCI\VEN_8086&DEV_2929,
- srs/intel/SNB/,PCI\VEN_8086&DEV_3A02,
- srs/intel/SNB/,PCI\VEN_8086&DEV_3A22,
- srs/intel/SNB/,PCI\VEN_8086&DEV_3B29,
- srs/intel/SNB/,PCI\VEN_8086&DEV_3B2F,
- srs/intel/SNB/,PCI\VEN_8086&DEV_3B22,
- srs/intel/SNB/,PCI\VEN_8086&DEV_1C02,
- srs/intel/SNB/,PCI\VEN_8086&DEV_1C03,
- srs/intel/SNB/,PCI\VEN_8086&DEV_27C3,
- srs/intel/SNB/,PCI\VEN_8086&DEV_27C6,
- srs/intel/SNB/,PCI\VEN_8086&DEV_2822,
- srs/intel/SNB/,PCI\VEN_8086&DEV_282A,
- srs/nvidia/,---- D:\WINPE\SRS\NVI,
- srs/nvidia/,PCI\VEN_10DE&DEV_0266,
- srs/nvidia/,PCI\VEN_10DE&DEV_0267,
- srs/nvidia/,PCI\VEN_10DE&DEV_037E,
- srs/nvidia/,PCI\VEN_10DE&DEV_037F,
- srs/nvidia/,PCI\VEN_10DE&DEV_036F,
- srs/nvidia/,PCI\VEN_10DE&DEV_03F6,
- srs/nvidia/,PCI\VEN_10DE&DEV_03F7,
- srs/nvidia/,PCI\VEN_10DE&DEV_03E7,
- srs/nvidia/,PCI\VEN_10DE&DEV_044C,
- srs/nvidia/,PCI\VEN_10DE&DEV_07F8,
- srs/nvidia/,PCI\VEN_10DE&DEV_07F9,
- srs/nvidia/,PCI\VEN_10DE&DEV_07FA,
- srs/nvidia/,PCI\VEN_10DE&DEV_07FB,
- srs/nvidia/,PCI\VEN_10DE&DEV_0AD9,
- srs/nvidia/,PCI\VEN_10DE&DEV_0AD8,
- srs/nvidia/,PCI\VEN_10DE&DEV_0ABD,
- srs/nvidia/,PCI\VEN_10DE&DEV_0ABC,
- srs/nvidia/,PCI\VEN_10DE&DEV_0BC4,
- srs/nvidia/,PCI\VEN_10DE&DEV_0BC5,
-
复制代码
[ 本帖最后由 hotdll 于 2011-10-6 22:32 编辑 ] |
|