After several hours to try to do it myself, i give up... again.
I have a list of strings in a file.
STRINGS.txt
string1
string2
string3
string4
I need to extract to output.txt all lines from input.txt which contain at least one of the strings from STRINGS.txt (a string = an entire line). I also need to extract all lines from input.txt that does not contain any strings, but i guess i will simply add a /v to findstr.
I could use a single line but in this case i think i can't use a space as part of the string (if i put a space at the beginning of a line in my STRINGS.txt, i.e before string in the strict sense, it finds no fake lines like "fakestring1"). Moreover, sometimes i have up to 200 strings...
Thanks in advance.
-----------------------------
EDIT:
Solution :
First case :
findstr /g:STRINGS.txt input.txt > output.txt
Second case :
findstr /v /g:STRINGS.txt input.txt > output.txt
Extract lines from a file using a strings list [resolved]
Moderator: DosItHelp