Search function chokes on '&'

  • Thread starter Thread starter Owen
  • Start date Start date
O

Owen

If I ask the Windows search function to search for files containing "& ", it
reports that it is searching for files containing "".

If I ask the Windows search function to search for files containing "&text",
it reports that it is searching for files containing "text", where 'text' is
any text.


If I ask the Windows search function to search for files containing "&& ",
it reports that it is searching for files containing "&".

Why is this?
 
Beats me.

Try using *&

Should find files or folders with "some text & some text"

Try using ?&

Should find files or folders with "some text&some text"

I have XP Pro SP1. I use Advanced Classic Search.

Search does fine with searching the ampersand (&) in both For files and
folders named: and Containing text:. Does fine with &text. Does fine with
&&. Doesn't find anything with &text or &&, but doesn't balk or change
characters.

I believe that &text means that the T is underlined.

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
Owen said:
If I ask the Windows search function to search for files
containing "& ", it reports that it is searching for files
containing "".
If I ask the Windows search function to search for files
containing "&text", it reports that it is searching for
files containing "text", where 'text' is any text.


If I ask the Windows search function to search for files
containing "&& ", it reports that it is searching for files
containing "&".
Why is this?

& is a system character and doesn't exist by definition in the
system. When you precede something with the & it's "escaping"
the following character and thus they are accepted. Clear as
mud, I know<g>.

To find, say, this & that you'd have to search for this
"&&" that . Pretend the first & tells it to interpret the
following as NOT being a system character, and thus a text
character.

Lots of interesting things are possible in the Search function
that most people never realize. You and AND or OR or exact
phrase, all that with the right characters. I have to experiment
with it each time to remember the details or I'd list them<g>. I
can never remember them and never took the time to write them
down.

HTH
Pop


HTH
Pop
 

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