I have a txt file that contains about 500 values, one per line. I need to check to see of any of those 500 values appear in any of 6 csv files each containing 100k lines. I can search for one value in those 6 csv files using
for /f "delims==" %%f in ('dir /s /b "P:\*.txt"') do FIND /N "[SEARCHSTRING]" "%~1%%f" >> "C:\found.txt"
but how do I do multiple searches automatically via command-line or batch file (CaSe SenSiTIve)?
fgrep -lf srchFile file1 file* ..will list all files that contain at least one word in srchFile. If you take out theland just leave-f, then the search will print the filename and the complete line that matches the word in your listFile. Good luck.