I've been using Windows XP, both Home and Professional versions, for some time now and have generally been impressed with its stability and speed, and have liked the user interface improvements. But recently I encountered a problem that really caught me be surprise. There are certain things that you just take for granted in Windows or any other operating system.
The problem I encountered was with the Windows search function. As you're probably familiar with, you can specify some text to search for within a set of files whose names match a specified pattern. For example, if you want to look for all the .log files that contain the text "error message", you can specify "*.log" on the first line of the Search panel and "error message" on the second line. You can also specify a drive letter or folder to start the search in. In my case I was doing a search of .properties files for a particular text string. Notice the figure showing the Windows XP search dialog where I have specified " *. properties" for the file name pattern, and "file" for the text string to search for. According to the Windows XP search results, there are no matches on my C: drive. However, I know for a fact that there are .properties files with the text string "file" in them. So why is Windows lying to me?
It turns out that this is a known problem with Windows XP. Look up Microsoft Knowledge Base article 309173 at support.microsoft.com/default. aspx?scid=kb;en-us;309173 and you'll see a description of the problem. It explains that Windows XP only searches specific file types. It doesn't search all files "to enhance the performance of searching and to avoid extraneous results." That's great, but what if the "extraneous results" are exactly what I'm trying to find. The article explains that I can install "Windows XP Application Compatibility Update, October 25, 2001" to add a few more file types, install a program with a registered search filter for the file type I'm interested in, or edit the Windows registry to search an additional file type. Well there's no program I'm familiar with that will allow me to search .properties files with Windows, so I tried editing the Windows registry. I found that didn't work for me. I still couldn't search .properties files.
I was starting to get mad, so I did a search of the Web and the newsgroups to see what solutions others might have found. One user mentioned a free utility called Agent Ransack (www.agent ransack.com). My problem with Windows XP turned out to have a silver lining, because I found that Agent Ransack was much better than the Windows XP search function!
As you can see from the second figure, Agent Ransack had no problem finding the .properties files containing the text string "file". As a bonus it also displays in the right pane the lines in a file that contain the specified text string, when you select that file in the search results pane on the left. When I first tried this on the .properties files, everything seemed to be on line 1 of each file. This is because .properties files don't use the Windows convention of ending lines with both a carriage return (CR) and line feed (LF) character. Not to worry because Agent Ransack can be configured to also look for the Unix and/or Mac conventions for ending a line. Go to the Search menu item, select Configuration... from the drop down menu, and check the desired check box. The figure shows the results on separate lines after I checked the Unix (LF) check box.
Another welcome feature that I always wondered why Windows didn't have is the ability to save search results to a file. Doesn't that seem pretty obvious if you want share the results with, say, a customer support rep? Agent Ransack also supports "regular expressions" for specifying searches. If you're a search guru, you may already be familiar with the special syntax of regular expressions. If not you can read about them in Help, and there's also an Expr. Wizard button to create an expression by answering a few questions on what you want to search for.
I first discovered the problem with search before Windows XP Service Pack 1 became available. Now there's another solution available if you install the service pack and turn on the "Index files with unknown extensions" option that you can get to through a complicated sequence described in Method 2 of the above-mentioned Microsoft Knowledgebase article. Even so you may want to give Agent Ransack a try.
|Richard Corzo is a computer programmer currently working for Apelon, Inc. in Ridgefield, CT. He has contributed past articles on PC operating systems and utilities.|