Code: Select all
wmic csproduct get name /format:list
Now I would like to strip the Name= part, so I use this:
Code: Select all
FOR /F "usebackq tokens=* delims=Name=" %%F IN (`wmic csproduct get name /format:list ^| findstr/c:"Name="`) DO (echo Unknown PC type: %%F)
But notice the delims=Name=
In my ignorance, I just specified the text I don't want. And it works. But then I read again about delims and it's a list of delimiting characters - not words. So I change the line to this, thinking I'm doing it right:
Code: Select all
FOR /F "usebackq tokens=* delims==" %%F IN (`wmic csproduct get name /format:list ^| findstr/c:"Name="`) DO (echo Unknown PC type: %%F)
Now I'm confused. The result is ok if I use delims the wrong way and vice versa. What's my mistake?