I'm trying to get a string returned into a variable in WIndows batch by using SET.
The command I'm running is:
for /f %i in (22NRmeta.txt) do symaccess -sid 22 list -type stor -dev %i -v | set %m = (findstr "Masking View Names") | echo %i % m >> 22PerDEV_ViewCount.txt
The issue is this: variable %m is returned to console as "%m" and not the result of findstr "Masking View Names")
Sample result returned to file below:
0BEC % m
0BF5 % m
0BFE % m
0C07 % m
0C10 % m
How do I get the result of findstr to echo to the file? Thanks folks!!