You could use recursive method, so create a function which will call its self until a condition/filter met. This will make all files within folder and its subfolders processed as well. And this would be an accurate way. Let me know what multiple string you need to find. Also, for finding multiple strings within files, you could use regex (regular expression) method, where the code will find based on pattern for each strings. This will make the search would be very quick instead of common string compare.