Active3 months ago
- As they clearly said, some work while others do not. For example, it will find.txt file that contain a word, but not.cpp,.cfg,.php, or even.ini files even though they are all plain-text (and.ini files are even standard to Windows!) This problem still exists and the simplest solution seems to be this answer.
- Nov 20, 2017 How to Search for Text in Files on Windows. This wikiHow teaches you how to search for specific text inside any document on your Windows PC. This opens the Windows Search box.
- Sep 16, 2016 Notepad is quite the versatile text editor for Windows even if you ignore the program's plugin system for a moment which extends it even further. One of the features that I make use of regularly is the program's ability to search for text in all files of a folder that I specify.
The search for text in multiple files is limited in Windows by default, but you can easily expand the types of files to be searched by rebuilding the files which are indexed in the search index. This can be done by going to the Control Panel, and choosing the Indexing options.
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.
Willi Mentzel12.7k1111 gold badges6060 silver badges7979 bronze badges
kitsunekitsune6,3531111 gold badges5353 silver badges7676 bronze badges
closed as off-topic by bummi, vefthym, EdChum, Jasper, greg-449Jul 20 '15 at 8:47
This question appears to be off-topic. The users who voted to close gave this specific reason:
- 'Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.' – bummi, vefthym, EdChum, Jasper, greg-449
Font Files
If this question can be reworded to fit the rules in the help center, please edit the question.17 Answers
Windows Grep does this really well.
Edit: Windows Grep is no longer being maintained or made available by the developer. An alternate download link is here: Windows Grep - alternate
RedFilterRedFilter140k3131 gold badges251251 silver badges258258 bronze badges
I'm a fan of the Find-In-Files dialog in Notepad++. Bonus: It's free.
SliverNinja - MSFT25.3k99 gold badges8686 silver badges143143 bronze badges
BQ.BQ.8,54833 gold badges2121 silver badges3333 bronze badges
There is also a Windows built-in program called
Ian Boydfindstr.exe
with which you can search within files.129k202202 gold badges725725 silver badges10411041 bronze badges
JohnnyFromBFJohnnyFromBF4,1791010 gold badges3838 silver badges4747 bronze badges
Agent Ransack is another good one. It's fast, free and has some other nice features like shell integration.
snowdudesnowdude3,49311 gold badge1414 silver badges2323 bronze badges
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.
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
AnytoeAnytoe1,30611 gold badge1515 silver badges2222 bronze badges
I'm a big fan of grepWin. It's free, lightweight and available from the explorer shell. I like not having to deliberately go find and start a program in order to search for something. I can just right click in explorer and bring it up.
Dan RigbyDan Rigby11.7k55 gold badges3333 silver badges5858 bronze badges
SeekFast is very convenient to search text in files - text files, MS Word, Excel, OpenOffice and others. It has a free version.
pamir_mirenpamir_miren
FileSeek. It's fast and it's free. It can find text strings, or match regular expressions.
Jon TackaburyJon Tackabury21.4k4444 gold badges118118 silver badges159159 bronze badges
Visual Studio's search in folders is by far the fastest I've found.
I believe it intelligently searches only text (non-binary) files, and subsequent searches in the same folder are extremely fast, unlike with the other tools (likely the text files fit in the windows disk cache).
VS2010 on a regular hard drive, no SSD, takes 1 minute to search a 20GB folder with 26k files, source code and binaries mixed up. 15k files are searched - the rest are likely skipped due to being binary files. Subsequent searches in the same folder are on the order of seconds (until stuff gets evicted form the cache).
The next closest I've found for the same folder was grepWin. Around 3 minutes. I excluded files larger than 2000KB (default). The 'Include binary files' setting seems to do nothing in terms of speeding up the search, it looks like binary files are still touched (bug?), but they don't show up in the search results. Subsequent searches all take the same 3 minutes - can't take advantage of hard drive cache. If I restrict to files smaller than 200k, the initial search is 2.5min and subsequent searches are on the order of seconds, about as fast as VS - in the cache.
Agent Ransack and FileSeek are both very slow on that folder, around 20min, due to searching through everything, including giant multi-gigabyte binary files. They search at about 10-20MB per second according to Resource Monitor.
UPDATE: Agent Ransack can be set to search files of certain sizes, and using the <200KB cutoff it's 1:15min for a fresh search and 5s for subsequent searches. Faster than grepWin and as fast as VS overall. It's actually pretty nice if you want to keep several searches in tabs and you don't want to pollute the VS recently searched folders list, and you want to keep the ability to search binaries, which VS doesn't seem to wanna do. Agent Ransack also creates an explorer context menu entry, so it's easy to launch from a folder. Same as grepWin but nicer UI and faster.
My new search setup is Agent Ransack for contents and Everything for file names (awesome tool, instant results!).
SteveSteve
TextPad is really good for this sort of thing. You can use it for free, but you get a warning message asking you to buy it. Other than that it is an excellent tool all round.
SimonSimon34.3k2424 gold badges7979 silver badges116116 bronze badges
If you don't want to install Non-Microsoft tools, please download STRINGS.EXE from Microsoft Sysinternals and make a procedure like this one:
CJBS10.5k44 gold badges5858 silver badges103103 bronze badges
FIBAFIBA
You could install cygwin (takes some time) and use grep -R .
RubenRuben8,40944 gold badges2929 silver badges4444 bronze badges
I tend to always use grep or find from unxutils. This works great on ms-windows.
JonkeJonke6,00922 gold badges2121 silver badges3939 bronze badges
FileSearchy. It's quick and free. It does have indexing, but only for file names and not contents.
lightsteplightstep37811 gold badge44 silver badges1616 bronze badges
I'd recommend GOW over cygwin, as it's much lighter, but still includes grep as well as another 130 or so *nix command-line utils in 18MB instead of >100MB.
TechSpudTechSpud2,65111 gold badge1414 silver badges2525 bronze badges
If you are looking for a console based utility to do that then you can refer to this url and create one for yourself.
what is does is find the list of search text in folder and return file matching with same name also returns if some file contains the text also
Pankaj SinghPankaj Singh
I can recommend ack - a command line program with linux roots, which fortunately works great also on Windows. It's faster than grep, it ignores git/subversion directories and binary files, and the output is more comprehensible. And typing ack is 25% faster than grep ;)
I tried it on babun (cygwin) and msys from git - works fabulously. It's written in perl so should work also in cmd.exe with perl installed somewhere on OS.
For windows, you can try 'Seekfast' it does all of it automatically. Here https://seekfast.org safe link.
Community♦
KoshmaarKoshmaar
Not the answer you're looking for? Browse other questions tagged searchfull-text-searchtext-files or ask your own question.
Active2 years, 5 months ago
In Windows XP we can search for files that contain a defined keyword (inside all files types).
Windows 7 can look inside files for a keyword, but only for text files. (
*.doc, *.txt, *.inf, ...
), not (*.conf, *.dat, *.*, ...
).Microsoft search filters don't contain any filter I can use for this.
How is this possible?
Breakthrough32k99 gold badges9595 silver badges144144 bronze badges
user8228
13 Answers
To get to the Indexing Options:
Start --> Control Panel --> Indexing Options
See Change advanced indexing options for more information.
If you click on the Advanced button in Indexing Options and go to the File Types tab, you will get a list of file types and the way they are indexed. For the file types you want, you can specify that you want the file contents indexed, and not just the file properties.
Or you can just do a normal search, and after the search is finished you can click on the 'File Contents' button under the 'Search again in' field (which is located after the end of the search results list, if you scroll to the bottom).
How Do I Search Files
Based on this page, the 'File Contents' option won't always show up - only when the folder being searched is not marked for file content indexing; in that case, file contents are supposedly searched automatically, without having to specify this option explicitly.
NikhilNikhil2,15244 gold badges1818 silver badges1818 bronze badges
I've always gotten better performance when searching inside files by using a GREP tool. I'm a fan of AstroGrep.
twlichtytwlichty1,30211 gold badge77 silver badges44 bronze badges
I believe you can also just enter 'content:blahblah' in the search filter box in upper right corner of Windows Explorer. This works at least for Text files and Office documents. It also works for source files.
Brian Hasden26811 gold badge22 silver badges1010 bronze badges
Sean SextonSean Sexton
jetjet
Notepad++ can do this and is free. Find in files is CTRL-SHIFT-F.
Jens Erat13.6k1111 gold badges4747 silver badges6262 bronze badges
Rob SedgwickRob Sedgwick
Agent Ransack is always worth a look. It's free, fast, good reputation, and doesn't use indexing.
snowdudesnowdude
In Windows Explorer, menu Tools -> Folder Options:
Press on the search tab and here, the first option: what to search, choose to search for non-indexed files inside the file.
Peter Mortensen8,5881616 gold badges6262 silver badges8585 bronze badges
user33873
Windows 7 still has the ability to search for strings inside files everywhere (and not in indexed locations).
In Windows Explorer, go to menu Tools/Folder options and select 'Always search file names and contents'.
Probably the file types still have to be set up correctly in Advanced Options of Indexing Options'.
Peter Mortensen8,5881616 gold badges6262 silver badges8585 bronze badges
Gunter SpranzGunter Spranz
The answer by Sean Sexton gave me what I was looking for (putting 'content:' in the search text box). But I think the following graphical explanation might be of help to others.
The equivalent of this search in XP Search Companion (dog):
is this in Windows 7:
Jeff RoeJeff Roe20411 gold badge44 silver badges1212 bronze badges
Have you tried search the internet for the correct iFilter (for instance - http://www.ifilter.org/)?
If you have the right iFilter, Windows should be able to search and index its content.
rifferterifferte
In Windows XP you could add further (text) file types to be searched via the registry:
I'm not sure whether this works with Windows 7 as well.
BennyIncBennyInc
You could try using Cygwin or grep version for Windows and searching *nix commands and search using the grep utility.
From Manual:
Using the Google gnuwin32 package, there is a grep version for Windows.
Peter Mortensen8,5881616 gold badges6262 silver badges8585 bronze badges
chrisjleechrisjlee1,82244 gold badges1616 silver badges2626 bronze badges
Windows 7 SP1 ignores content: and contents: for me now, and it looks like the mechanism has changed: Now you type in what you want, and as soon as the search starts, a row at the bottom shows up with 'Search again in:' Libraries, Computer, Custom, Firefox, and most importantly, File Contents. Click that and it restarts the search within files, even if the folder is unindexed.
SilverbackNetSilverbackNet
protected by TroggyDec 17 '10 at 13:46
Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
Would you like to answer one of these unanswered questions instead?