Here's a sample of the output:
Type Name Status Version
--------------------------------------------------------------------
le "OvSvcDiscErrorLog" enabled 0011.0000
le "OvSvcDiscServerLog" enabled 0011.0000
msgi "MS Win Catch All opcmsg" enabled 0001.0044
msgi "Magic Integration Test" enabled 0001.0008
The only stuff I want is the stuff under the Name column, including the quotation marks (I'll need them later). You can see that some of my lines have spaces between the quotes, so I can't just tokenize it on a space or I lose half of my wording.
Here's how I'm trying to escape the quotes, but no luck:
Code: Select all
for /f "delims=^"" %%p in ('ovpolicy -list -level 0') do echo %%p >> c:\policies.txt