| Forum Home | ||||
| Press F1 | ||||
| Thread ID: 51122 | 2004-11-12 06:54:00 | What's a better search for text within files than Windows XP's search? | Kame (312) | Press F1 |
| Post ID | Timestamp | Content | User | ||
| 290951 | 2004-11-12 06:54:00 | Hey, I need to search within PHP files in a directory including sub-directories for a single string so that I can collect all files that I'll need to update them for compatibility reasons. Or alternatively, is their a WinXP Reg Hack to get it to search PHP files, considering they are only ASCII (text) based files, yet they seem to get ignored by Window's Search. Thanks in advance, Kame. |
Kame (312) | ||
| 290952 | 2004-11-12 07:01:00 | Sorry for wasting time, Answer found here www.mostlycreativeworkshop.com Anyways if there's other alternative tools, I'd still be interested. |
Kame (312) | ||
| 290953 | 2004-11-12 07:08:00 | Do a search for this file grep22setup.exe it will install Windows Grep which sounds as if it is exactly what you want. | mikebartnz (21) | ||
| 290954 | 2004-11-12 07:29:00 | The above link explained a lot. I had just assumed MS had though adding an animated puppy was more important than a search that actually works. Anyway, if you don't mind the command line then either "find" or "findstr" (has regex support) will do what you want. They aren't as good as grep but they come standard with windows. For GUI searching I usually use TextPad which has a find in files option. |
bmason (508) | ||
| 290955 | 2004-11-12 07:37:00 | grep for Windows, I forgot all about it, I actually run mingw32 which is like a linux bash-like program on Windows and it has grep, I could have used that instead, my bad. Anyways the site I posted about the Reg Hack for it, is not completely correct, so I'll provide a better method. ALWAYS REMEMBER TO BACKUP YOUR REGISTRY We need to create a .reg file but the problem being it has to be binary format. The easiest way is to export a similar and already Windows Searching capable, so browse to HKEY_CLASSES_ROOT\.xml and right click on it and export it to your desktop, call it php.reg Now in an editor, edit the program to show. [HKEY_CLASSES_ROOT\.php] "PerceivedType"="text" @="phpfile" [HKEY_CLASSES_ROOT\.php\PersistentHandler] @="{5e941d80-bf96-11cd-b579-08002b30bfeb}" Save it and now, double click on it and it'll ask if you want to add it to the registry, say yes and that's it. Restart the computer then try searching and be amazed. You can just change .php to whatever file extension you like but remember that @="phpfile" maybe better if it's not set at all e.g. @="". Cheers, Kame |
Kame (312) | ||
| 290956 | 2004-11-12 07:53:00 | There seems to be a lot of extensions missing for text only files, I think I'll write a complete Reg Hack for all the missing files, that I would believe would be worth including, who cares if it makes their search function slower, that just shows how stupid they can be, it's like buying a happy meal and not getting the toy because it would have taken the staff longer to grab it. Although from this, I can say Microsoft like quick and poorly made software, they cater for stupid things and not what's important. Who's thinking they're still safe behind their MS Firewall now? Kame |
Kame (312) | ||
| 290957 | 2004-11-12 08:33:00 | Boot Knoppix - Mount your Windows folder and: cat /mnt/hda1/Program\ Files/Apache2/htdocs/* | grep text_to_search_for ;-) |
Chilling_Silence (9) | ||
| 1 | |||||