Very often I find myself need to search the contents of source files in development projects. This is more than just searching for files, typically I’m looking for a specific word or phrase contained anywhere within a file or many files. On linux platforms, grep makes this trivial. There are windows grep tools, but I’ve always felt the implementation is poor.
By default, Windows XP has a very basic file contents search, problem is it ignores many filetypes. Windows 7 may have improved on this, I’ll have to check into. There is a great utility however that is a vast improvement over the standard windows file contents search. See FileLocator , a powerful tool that performs file contents searching thats light years ahead of the windows built in search. The best parts of the filelocater tool are (1) it’s ability to run from the command line and (2) it’s ability to export results to a csv or text file. Good stuff.
Here’s an example cmd line run of this tool -
C:\Program Files\Mythicsoft\FileLocator Lite>FileLocatorLite.exe -o files-to-change.csv -ofc -ocn -d "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\local-devel" -c live.server.com -f *.php;*.js;*.html -s
thanks