This is on Windows 7 using command line and batch files.
I was looking to examine my program list and uninstall a good amount of junk and update a good amount of outdated programs. I used a wmic command to get a text document with every program, line-by-line. I want to remove every program from that list with "microsoft", "windows", or "visual" in the name. I'm trying to do this using the findstr command, and the /v option that makes it output only lines without a match. However, running the program I wrote finds no matches within the file so basically just copies it. I tried the wild characters as well in case it's the other characters around the word messing it up or something.
Here's an example of one of the lines in the file it's looking through: (LASTNAME-LAPTOP,Microsoft Office Excel Viewer,12.0.6612.1000)
The PATH is just a representation of the path to my flash drive folder, in the script it's the actual path to a folder with both RTF files inside it. It contained a space so I put quotes around the source and output.
Here is my program:
findstr /i /v ".microsoft. .windows. .visual." "E:\PATH\programs.rtf" > "E:\PATH\programs2.rtf"