I'm using a dual bool Windows machine with different versions of Windows on it (8.1 and 10) and I need a way of noting each installs unique GUID identifier.
Currently I can only export the entire bcdedit which is not what I'm after, how can I export the GUID identifiers and the descriptions ONLY into a txt file?
As @Squashman answered in comments the simplest way to get your target(s) is
You asked how to remove top two entries, so use more for less :-)
and if your next question is 2+2 use 4
c:\Windows\System32\bcdedit.exe /enum |findstr "den des" |more +4 >c:\output.txt
the output is sent to a file which because you are running in an unknown but likely protected zone I simply sent to the c:\ root directory, change to the temporary folder or other desired location. You can check the output with type.
and
For /F "Tokens=2*" %G In ('%SystemRoot%\System32\findstr.exe "e" c:\output.txt') Do @echo %~G %~H >c:\out2.txt
will then return using type
Remember for %%var if you are adding together as a batch file:-
RunMe.cmd (MUST BE run as administrator, otherwise you will see that bcedit access denied will result in "The system cannot find the file specified.")
Note the above result depends on 6 simple entries from my tests and
more +4
removes the first 4 it is not a robust solution to deal with varying number of lines output from bcedit.exe. so YMMV