[已解決]批處理如何提取txt文本中含有特定字符串的行內容最后由 pcl_test 于 -8-13 20:50批處理如何獲取TXT中設備下面標示符的字符串?這是Windows8.1 BCD中的內容 我想獲取TXT中【設備選項】下面標識符的字符串 【{e9aa8814-419f-11e4-972a-f4ce4698d370} 】并輸出到b.txt 這只是個范例 可能其它BCD中字符串就不在這一行了 最好不要用行數來識別字符串,謝謝!nclick="copycode($('code0'));">復制代碼
- Windows 啟動管理器
- --------------------
- 標識符{bootmgr}
- devicepartition=C:
- description Windows Boot Manager
- localezh-CN
- inherit {globalsettings}
- integrityservices Enable
- default {current}
- resumeobject{e9aa8811-419f-11e4-972a-f4ce4698d370}
- displayorder{current}
- toolsdisplayorder {memdiag}
- timeout 30
- Windows 啟動加載器
- -------------------
- 標識符{current}
- devicepartition=C:
- pathWindowssystem32winload.exe
- description Windows 8.1
- localezh-CN
- inherit {bootloadersettings}
- recoverysequence{e9aa8813-419f-11e4-972a-f4ce4698d370}
- integrityservices Enable
- recoveryenabled Yes
- allowedinmemorysettings 0x15000075
- osdevicepartition=C:
- systemrootWindows
- resumeobject{e9aa8811-419f-11e4-972a-f4ce4698d370}
- nxOptIn
- bootmenupolicyStandard
- Windows 啟動加載器
- -------------------
- 標識符{e9aa8813-419f-11e4-972a-f4ce4698d370}
- deviceramdisk=[C:]RecoveryWindowsREWinre.wim,{e9aa8814-419f-11e4-972a-f4ce4698d370}
- pathwindowssystem32winload.exe
- description Windows Recovery Environment
- localezh-cn
- inherit {bootloadersettings}
- displaymessageRecovery
- displaymessageoverrideRecovery
- osdeviceramdisk=[C:]RecoveryWindowsREWinre.wim,{e9aa8814-419f-11e4-972a-f4ce4698d370}
- systemrootwindows
- nxOptIn
- bootmenupolicyStandard
- winpe Yes
- 從休眠狀態恢復
- ---------------------
- 標識符{e9aa8811-419f-11e4-972a-f4ce4698d370}
- devicepartition=C:
- pathWindowssystem32winresume.exe
- description Windows Resume Application
- localezh-CN
- inherit {resumeloadersettings}
- recoverysequence{e9aa8813-419f-11e4-972a-f4ce4698d370}
- recoveryenabled Yes
- allowedinmemorysettings 0x15000075
- filedevicepartition=C:
- filepathhiberfil.sys
- bootmenupolicyStandard
- pae Yes
- debugoptionenabledNo
- Windows 內存測試程序
- ---------------------
- 標識符{memdiag}
- devicepartition=C:
- pathbootmemtest.exe
- description Windows 內存診斷
- localezh-CN
- inherit {globalsettings}
- badmemoryaccess Yes
- EMS 設置
- ------------
- 標識符{emssettings}
- bootems No
- 調試器設置
- -----------------
- 標識符{dbgsettings}
- debugtype Serial
- debugport 1
- baudrate115200
- RAM 故障
- -----------
- 標識符{badmemory}
- 全局設置
- ---------------
- 標識符{globalsettings}
- inherit {dbgsettings}
- {emssettings}
- {badmemory}
- 啟動加載器設置
- --------------------
- 標識符{bootloadersettings}
- inherit {globalsettings}
- {hypervisorsettings}
- 虛擬機監控程序設置
- -------------------
- 標識符{hypervisorsettings}
- hypervisordebugtype Serial
- hypervisordebugport 1
- hypervisorbaudrate115200
- 恢復加載器設置
- ----------------------
- 標識符{resumeloadersettings}
- inherit {globalsettings}
- 設備選項
- --------------
- 標識符{e9aa8814-419f-11e4-972a-f4ce4698d370}
- description Windows Recovery
- ramdisksdidevicepartition=C:
- ramdisksdipathRecoveryWindowsREboot.sdi