search for "A word or phrase in the file"

  • Thread starter Thread starter bill
  • Start date Start date
B

bill

I am finding some odd behavior when I search for a file or folder
using the following option:
"A word or phrase in the file"

If I create a new folder, call it searchtest.
And, then create the following 4 files:
abra.txt (empty file)
abra2.txt (has one line "test")
abra.vi (empty file)
abra2.vi (has one line "test")

Then, I search that folder, using
All or part of file name:
<blank>
A word or phrase in the file:
test

I get the following:
abra2.txt
I expected to get the following, correct?
abra2.txt
abra2.vi

If I search that folder, using:
All or part of file name:
<blank>
A word or phrase in the file:
abra

I get the following:
abra.txt
abra.vi
abra2.txt
abra2.vi

I should get no files, right?
Can someone confirm this.

I am running windowsXP/SP2 with all updates.
 
bill said:
I am finding some odd behavior when I search for a file or folder
using the following option:
"A word or phrase in the file"

If I create a new folder, call it searchtest.
And, then create the following 4 files:
abra.txt (empty file)
abra2.txt (has one line "test")
abra.vi (empty file)
abra2.vi (has one line "test")

Then, I search that folder, using
All or part of file name:
<blank>
A word or phrase in the file:
test

I get the following:
abra2.txt
I expected to get the following, correct?
abra2.txt
abra2.vi

If I search that folder, using:
All or part of file name:
<blank>
A word or phrase in the file:
abra

I get the following:
abra.txt
abra.vi
abra2.txt
abra2.vi

I should get no files, right?
Can someone confirm this.

I am running windowsXP/SP2 with all updates.

Correct. The WinXP Search only searches recognized text files for a word or
phrase.

--
Frank Saunders, MS-MVP OE
Please respond in Newsgroup. Do not send email
http://www.fjsmjs.com
Protect your PC
http://www.microsoft.com/security/protect/
 
Frank,
Thanks for the reply.
1. Is there any way to add a file type to the recognized text files?
2. You did not respond to my second example.
That is, why does "a word or phrase in the file" report files that
do
have that word or phrase in the file?
regards,
bill
 
Frank,
Thanks for the reply.
1. Is there any way to add a file type to the recognized text files?
2. You did not respond to my second example. That is, why does "a
word or phrase in the file" report files that do not have that word or
phrase in the file?
regards,
bill
 
bill said:
Frank,
Thanks for the reply.
1. Is there any way to add a file type to the recognized text files?
2. You did not respond to my second example.
That is, why does "a word or phrase in the file" report files that
do
have that word or phrase in the file?
regards,
bill

1. Open Windows Explorer and click Tools | Options | File Types. Add your
file type and associate it with a text editor.
2. I didn't answer because I don't know. Good enough reason for me.

--
Frank Saunders, MS-MVP OE
Please respond in Newsgroup. Do not send email
http://www.fjsmjs.com
Protect your PC
http://www.microsoft.com/security/protect/
 
Frank,
Thanks, but your suggestion to add the file type to windows explorer
did not work :(
That is a good reason.
regards
bill
 
David,
If what you say is correct, then whenever you search for text that
matches (or partially matches)
a file name, you will get a list of files, some (or all, in this case)
of which may not contain the text?
Do you think that is how it should work?
regards,
bill
 
Yes. It is doing what you asked it - searching all properties. You can specify exactly what is queried by using query language. See Indexing Server help for query language. Note advanced queries generally cannot be applied to contents.
 
bill said:
Frank,
Thanks for the reply.
1. Is there any way to add a file type to the recognized text files?
2. You did not respond to my second example.
That is, why does "a word or phrase in the file" report files that
do
have that word or phrase in the file?
regards,
bill
Hi,

For 1., I suggest you take a look at this KB article:

Using the "A Word or Phrase in the File" Search Criterion May Not Work
http://support.microsoft.com/default.aspx?scid=KB;EN-US;309173

You might want to look here as well:

Add Files to Containing text Searches
http://www.dougknox.com/xp/scripts_desc/xp_fix_search.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top