Is there a way in Windows XP to search for a particular file containing the word "jack_user" inside multiple directories with multiple files?
migrated from stackoverflow.com Sep 23 '11 at 3:48
|
You want to use the Windows search engine? In this window you can set the word "jack_user" in "A word or phrase in the file: " and you can select the root folder in "Look in" combo box:
|
||||
|
|
|
You can use Microsoft Windows Search SDK |
|||
|
|
|
I believe your best bet is to use the windows sdk for search functionality |
|||
|
|
|
Yes, you can. When you search for a file you can supply some certain text that should be contained within the files' content. And you can also provide which directory it should be searching in and also if it should go through all subdirectories. The only problem is, that the Windows search only searches within files of certain types (listed here). It might not find what you are looking for. There are some tools out there, that search within EVERY file. Google hits up some results. If you want to do it programmatically, you can use the Search API, although I am not sure if it has the same limititations. If it does you probably will have to open every file you come across and check the contents with a regular expression. |
|||
|
|
|
With a GUI in XP I would use "Lookdisk" because it is freeware, and i understand how to use it. It will search internally in everything you ask it to, which can take a long time, and come up with false positives too depending on the complexity. For me it was better than all the misses from other tools. When searching more complex stuff like "text" in programs/exe, I can use the "text to hex", and put the complimentary 00s in it also, to find where a exe or dlls internal text items came from. There has not been anything that i could not search for, no mater where it was or how it was. also will show the line numbers and that kinda stuff. call me lasy, but i can send it out gleening through internals for something, taking so long that i just ignore it and come back to it. but it beats trying to see "the matrix" :-) |
||||
|
|
|
If you have access to PowerShell I would use Get-Content |
|||
|
|
I use Wingrep, a port of the Linux tool. It works nicely and gives you the line number and file name. |
||||
|

