Pages

Tuesday, January 23, 2018

Search across loads of text based files with massiveSearch.py

Today I want to share this python script that is being very very useful for me. massiveSearch allows you to search a particular string across many text based files like .txt, .cpp... I found it extremely useful when looking for strings in thousands of source code files.

Using the script is very simple. At the top there's a list of extensions of files that the script takes. You can add more text based file extensions if necessary.

First you enter a path, then a string to search and that's all. If there are matches, you'll get a path to each of the files and the lines where the matches are.

Download the script here:
https://drive.google.com/file/d/1JrymKtoEit6eekECaj3nY0vMED4TAbsz/view?usp=sharing

Hope it helps.

No comments:

Post a Comment