I am writing a script that MUST be in VBA. The goal is to search about 3500 files (450mb) for 200+ strings that do not contain each other. What would be more efficient, to search through the files for each tag individually and break out of the file once the string is found (all I need to know is that it is there), or should I search each line for every tag in one pass to save having to open each file 200+ times?
Share
For most files opening will be the most time consuming part in a script like this as it requires disk and possibly even network operations and not just RAM memory operations (which is faster by far).
Therefore the recommendation is to Open 1 file and check for the 200+ strings in it and whatever follows from that check. Then move to the next file.