Searching for strings in Vista using Windows Explorer doesn't seem to work

C

Celegans

In past years I have used Windows Explorer a lot looking for files by name
or for files with a particular string in them. I often am looking through
"odd" file types for things, not just files that Windows Vista is likely to
index.

For example, I have a lot of old UNIX Bourne shell scripts with extensions
..sh. I can find just these .sh shell scripts by specifying Name "*.sh" in
the Advanced search in Vista. (The "Name" field makes me uneasy since I
don't know what it's searching with all the "automatic" indexing.) But what
if I want to find old .sh shell scripts that had the string "uname" in them?
How do I do this? This used to be simple but I cannot figure it out. What
am I missing?

In XP I could simply right click on the folder in Windows Explorer and
select Search. Then I could specify filename and/or words in a file.

In Vista I can still right click and select Search in Windows Explorer. I
can then select Advanced Search -- I don't really trust regular search for
anything since it almost never works. But how do I say I want to find a
particular string in a file that may not be indexed? The user interface
doesn't seem to show I have this option.

Is Windows Explorer search in Vista so bad now that I'll need a third party
tool for searching for simple strings without indexing files? Perhaps I
should just go with Linux and grep and abandon Vista with "easy" tasks
becoming impossible with Vista? With Vista's search failing all the time,
it takes a lot longer to find things manually, and I find myself wanting to
go back to XP every day. Too many things in Vista are "different" but not
really "better".

efg
 
D

Dave Wood [MS]

This can be done, and when enabled, typing in Explorer search boxes will
search both filenames and contents automatically. But, there's a couple of
caveats:
- By default searches for file contents are only enabled in Indexed
locations. You can either index the directories you are interested in {with
the Indexing Options control panel}, or modify the default so searches in
non-indexed locations also search contents {with the Folder Options control
panel}.
- This file-contents-searching only happens on 'known' file extensions.
You can add new file extensions with the Indexing Options -> Advanced ->
File Types page, but there isn't a 'Search all unknown file types as if they
were text files' option. This is the same behavior as XP I believe.

Dave
 
A

Andrew McLaren

Celegans said:
tool for searching for simple strings without indexing files? Perhaps I
should just go with Linux and grep and abandon Vista with "easy" tasks
becoming impossible with Vista? With Vista's search failing all the time,

Hi, Caenorhabditis :)

In additiion to Dave Woods' reply, I should mention you can easily grep for
files in Windows (NT4.0, 2K, XP and Vista) using the "findstr" command. This
is a standard Windows command, in every Windows installation.

At a command prompt, run "findstr /?" to get the syntax.

Findstr is very similar to grep ... in fact why they just didn't call it
"grep" I dunno, probably some weird licensing issue.

For finding text in a random collection of files, I find findstr much
faster, and easier to use, than Vista's WDS-style search facility.

Hope it helps,
 
C

Celegans

Microsoft doesn't seem to understand the requirement is to search for files,
because there is information in files that is needed. Using an indexing
scheme to speed up the search is an optimization technique. Somehow an
optimization technique is "OK" even when the search fails! Unbelievable.
The search is fast, but the SEARCH IS WRONG. Microsoft has FAILED to
deliver a file search feature in Windows Vista that works. I am tired of
wasting my time searching manually on Vista to find files I know exist
because Microsoft implemented such a poor search strategy.

Why is it so hard to communicate with Microsoft? It's as if they hire new
college graduates, with little real-world experience, and then let them
write software. THIS IS SO FRUSTRATING. I once even argued with Microsoft
that a "blue screen of death" meant there was a bug. Microsoft wasn't so
sure.

Doesn't anyone at Microsoft know this quote form the famous computer
scientist, Donald Knuth?

Premature optimization is the root of all evil (or at least most of it) in
programming.
Donald Knuth
http://www.brainyquote.com/quotes/quotes/d/donaldknut181625.html

Search was pretty good in Windows 98 and 2000, then somehow search
optimization went south in Windows XP. I spent countless hours looking for
files I knew existed but Windows XP couldn't find them. Then I discovered
Microsoft misoptimized, and failed on the requirement that search find all
files, not just the ones that Microsoft thinks people should be looking for.
Is this arrogance or myopia on Microsoft's part that they don't search all
files? It doesn't really matter to end users -- we just know that SEARCH
DOES NOT WORK.

This following Microsoft technical note was about XP. Why are things now
even worse in Vista? This is progress?
Using the "A word or phrase in the file" search criterion may not work
http://support.microsoft.com/kb/309173


http://www.engadget.com/2007/06/19/vistas-search-to-be-altered-in-first-service-pack/
Microsoft plans to use the first service pack for Vista to make the changes
to desktop search"
WHEN WILL THIS GET FIXED?

VISTA IS NEARLY WORTHLESS WHEN YOU CAN'T FILE OLD FILES, AND FRUSTRATING
BECAUSE MICROSOFT DOESN'T CARE. I have to go back to an old machine to
search the files I moved to Vista to find important information. Why?

Dave, thanks for your reply, but the caveats make search worthless in Vista.
I work in a multi-platform environment, sometimes with files that originate
on various Linux boxes, or from Apple machines that don't usually even have
file extensions. I have thousands and thousands of files that Microsoft
decided I cannot search using Vista. Why? Should I be wasting my time
looking for a third party search tool for Vista (or wasting my time writing
one because Microsoft's is so bad)?
 
C

Celegans

Andrew McLaren said:
Hi, Caenorhabditis :)

In additiion to Dave Woods' reply, I should mention you can easily grep
for files in Windows (NT4.0, 2K, XP and Vista) using the "findstr"
command. This is a standard Windows command, in every Windows
installation.

At a command prompt, run "findstr /?" to get the syntax.

You knew my first name <g>!

Thanks for that suggestion and I'll use that command line tool to search
directories until a better tool is available in Vista's Windows environment.

efg
 

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