Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tool to recursively search all files in a directory for a string [duplicate]

I have to change some connection strings in an incredibly old legacy application, and the programmers who made it thought it would be a great idea to plaster the entire app with connection strings all over the place.

Visual Studio's "current project" search is incredible slow, and I don't trust Windows Search.

So, what's the best free, non-indexed text search tool out there? All it should do is return a list with files that contain the wanted string inside a folder and its subfolders.

I'm running Windows 2003 Server.

like image 777
kitsune Avatar asked Nov 25 '08 16:11

kitsune


3 Answers

There is also a Windows built-in program called findstr.exe with which you can search within files.

>findstr /s "provider=sqloledb" *.cs
like image 164
JohnnyFromBF Avatar answered Oct 08 '22 00:10

JohnnyFromBF


I'm a fan of the Find-In-Files dialog in Notepad++. Bonus: It's free.

enter image description here

like image 32
BQ. Avatar answered Oct 07 '22 23:10

BQ.


I like AstroGrep. The results are shown in a list. A click on a row shows you the whole line as a preview highlighting the hit. It seems to be quite fast, lean and it is free. Tested on Windows 7, 8, 10 and Windows Server 2008 R2. Allows regular expressions.

Latest AstroGrep Screenshot

AstroGrep is a Microsoft Windows GUI File Searching (grep) utility. Its features include regular expressions, versatile printing options, stores most recent used paths and has a "context" feature which is very nice for looking at source code

Reference: AstroGrep

like image 26
Anytoe Avatar answered Oct 07 '22 23:10

Anytoe