|
XP系统下,可以使用如下代码,PE环境中请自行修改:
- @echo off
- setlocal enabledelayedexpansion
- for /f "tokens=1* delims=:" %%i in ('findstr /n /c:"Found Device" bartpe.txt') do (
- if not "%%i"=="" call :pick-up %%i
- )
- pause
- goto :eof
- :pick-up
- for /f "skip=%1 delims=" %%i in (bartpe.txt) do (
- set var=%%i
- if not "!var:~0,3!"=="No " goto find_inf
- goto :eof
- )
- :find_inf
- findstr /m /c:"%var%" *.inf
- goto :eof
复制代码
[ 本帖最后由 namejm 于 2006-11-28 12:47 PM 编辑 ] |
|