How do you search for a text string in all files regardless of extension?
I’m new to XP so maybe I’m missing something obvious. But. Searching in XP seems to limit itself to “known” file types. How do you (can you?) persuade it to look in every file regardless? Even putting . as the filename and searching in all files and folders doesn’t work.
How you get to it depends on how you’ve got your search dialog customised (if at all); if you’re looking at a cartoon dog, then it’s straight-out-of-the-box.
Anyway, you want to click the ‘All files and folders’ thing, then a couple of text boxes will pop up; one of them is labelled ‘containing text:’ or something; that’s the one you want - it can be used in conjunction with the others to limit the scope of the search.
Unlike grep though, you just get a list of files where the string was found; you’ll still have to open them all and find it in context.
Wow. I’ve worked in Windows based support roles for years and had never realised the default search limited ‘Containing Text’ to extensions it recognised. I tested by making two text files with the same one word in each and deleting the extension of one of the files. Search only found one of the files. Once I added the .txt extension, the second file appeared in the search results without even having to do another search. I feel like my world has been turned upsidedown
Have a look at theselinks for possible workarounds.
I nearly put my fist through the screen in blind fury when I clicked ‘turn off the cartoon dog’ and, rather than just disappearing (like I’d asked), it stood up, wagged its tail and looked about, then spent a few seconds wandering off.
Yup folks, Microsoft use your CPU cycles and disk space to animate the turning off of the cartoon “helper”***** but they ship an OS with a crippled search utility.
Update: Method 2 from Fredescu’s first link seems to have fixed it. But what a palavar. The second link involved running vb scripts to fiddle with the registry, um, no thanks.
***** didn’t Clippy used to wink or something?
This is mentioned in Fred’s second link, but I don’t think it’s what you did Mange…
I now swear by ‘Agent Ransack’ when it comes to searching inside files. Very snazzy little program, and free!!
Fun to use too… I often find that I’m muttering under my breath. “Search this folder? Nah, that won’t find what I’m looking for, I shall have to RANSACK it!!” Or something not quite as intelligible to the same effect.
Are you talking about searching open files? Or searching through a directory or directory tree and finding ALL matches for a search term, which is a different kind of thing, and sounds like what the OP was asking for.
I have a few MDI text editors that will do a global search on their open files. But I’m not going to drop more than a few dozen files into it to do a search. (I might use a tool like that for global search-and-replace after I’ve found the files by another tool.)
But with agent ransack I can tell it to search a drive that has tens of thousands of files and get the results back in a minute or few, without having my system slow to a crawl in the meantime. (Depending on how big the files are of the appropriate file extension or whatever, of course. )
For searching within just about any sort of file I use copernic desktop, which is a very fast (almost instantaneous) search, but does seem to use a lot of resources in the background collating stuff www.copernic.com/en/products/desktop-search/
Searching through files, open or not. There is a menu item for searching, one of the options is search “files” and another option is “traverse directory trees”. I use Texpad, it works well for “grepping”.
Assuming the feature isn’t dropped in the meantime.
Shorthorn: Where can’t it go today?
If you want a real grep for Windows, installing Cygwin is the best option:
The downside to Cygwin is that the tools aren’t graphical and the default Windows command line sucks worse than a two-dollar hooker. Unless you want to upgrade to bash, which I recommend you do if you spend any time applying batch changes to large groups of text files, you might be better off with a graphical program.
Nobody’s mentioned findstr.exe yet? It comes with windows, and is a command-line text search tool. It doesn’t have the same semantics as grep, but it’s useful in similar ways e.g.:
c:> findstr /spin SomeFunction *.c *.h *.cpp *.cs
(note that the /s makes it recursively search files in subdirectories, whereas with grep you’d need to use it in conjunction with ‘find’ or something)