I have been working on creating some BitLocker related tasks but having some difficulties with taking multiple results and getting them into separate lines of a batch file being created.
So what I am trying to do is to take each line of the following relevance expression and put it into its own separate line
Q: (names of it) of drives whose (type of it = "DRIVE_FIXED")
A: C:
A: D:
T: 0.138 ms
what I want is for it to be added to a create file
createfile until __EOF
REM test
cd c:\Windows\System32
manage-bde.exe -on C: -rp
manage-bde.exe -on D: -rp
... (any other number of fixed drive letters)
__EOF
I was thinking that I can use something like the following but it doesnt really scale if a drive has 6 fixed drives.
preceding text of first “:” of following text of first “:” of (names of it) of drives whose (type of it = “DRIVE_FIXED”)
I was also thinking the super dirty “if exists fixed drive A:” then appendfile else “if exists fixed drive b:” then appendfile and so on
any ideas of a cleaner way to do this?