searching files for a string starting with #

  • Thread starter Cameron Fitzhugh
  • Start date
C

Cameron Fitzhugh

When I try to use Search Assistant to find C preprocessor directives, it
gives me the message:

"The Indexing Service query cannot be completed successfully because the
volumes you have specified are not indexed."

This happens whenever the search string begins with #. Apparently the
Search Assistant interprets a # as indicating a directive to the Indexing
Service, not an ordinary text string to search for. If I enter "include" as
the search string, it will find the files containing the string -- but if I
enter "#include", it refuses to search. I tried to escape the # with the
search string "\#include", but the \ didn't serve as an escape character, it
became part of an ordinary search string (no longer beginning with #).

So, is there any way to get Search Assistant to search for C preprocessor
directives?

Thanks,
Cameron
 
H

HeyBub

Cameron said:
When I try to use Search Assistant to find C preprocessor directives,
it gives me the message:

"The Indexing Service query cannot be completed successfully because
the volumes you have specified are not indexed."

This happens whenever the search string begins with #. Apparently the
Search Assistant interprets a # as indicating a directive to the
Indexing Service, not an ordinary text string to search for. If I
enter "include" as the search string, it will find the files
containing the string -- but if I enter "#include", it refuses to
search. I tried to escape the # with the search string "\#include",
but the \ didn't serve as an escape character, it became part of an
ordinary search string (no longer beginning with #).
So, is there any way to get Search Assistant to search for C
preprocessor directives?

Go for Agent Ransack (free) and disable indexing (it's a cycle-hog).
 
P

Pegasus \(MVP\)

Cameron Fitzhugh said:
When I try to use Search Assistant to find C preprocessor directives, it
gives me the message:

"The Indexing Service query cannot be completed successfully because the
volumes you have specified are not indexed."

This happens whenever the search string begins with #. Apparently the
Search Assistant interprets a # as indicating a directive to the Indexing
Service, not an ordinary text string to search for. If I enter "include" as
the search string, it will find the files containing the string -- but if I
enter "#include", it refuses to search. I tried to escape the # with the
search string "\#include", but the \ didn't serve as an escape character, it
became part of an ordinary search string (no longer beginning with #).

So, is there any way to get Search Assistant to search for C preprocessor
directives?

Thanks,
Cameron

You could, of course, run this command from a Command Prompt:

dir /s #*.*
 

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

Top