I was looking at this other question, but wasn't sure how to combine these queries together.
I started off with this, but it doesn't seem to work:
findstr /S /M "string A" *.vb | findstr /S /M /V "string B" > output.txt
For example, I want to get a list of files containing "string A" but NOT "string B".
I would like to use the Windows command line if possible or Windows PowerShell.
ls .\*.vb | Select-String A | Select-Object path -unique | Where-Object{!(Select-String -InputObject $_ -Pattern B)}