I wish to search for 500 strings in 2500 .c/.h files and return the line and files containing the string. Something that is built in Total Commander's search function. Is there a way I can automate the TC search and retrieve the results?
Or else can this be achieved in Python without TC?
In Total Commander you can pick menu Commands->Search in separate Process...
Then you can filter c/h files using e.g. this mask in "Search for" field: *.cpp;*.c;*.cxx;*.hpp;*.h;*.hxx (add/remove which one do you need).
Afterwards you can enable "find text" box and "Regex (2)". And enter your words in text as (word1|word2|word3).
This is also possible to do with Python if you prefer it.
Total Commander Automation using Python