Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

Question

Searching desktop folders

Dec 30, 2011 7:50AM PST

<div>I have a folder containing about 2,000 image files. I open the folder and enter a number, say 1997, in the search oval to find the files with that number. However, the search returns only file names beginning with 1997, or those with no other number before. Thus it retrieves names like: h1997 or 51-1997 or ABC.1997 but not 301997 or 511997. On the other hand, if after making an initial search:
1. one hits the + icon to make a detailed search
2. chooses search by "name" and "contains"
3. empties the initial search oval
4. enters 1997 in the detailed seach box

all the filenames with 1997 are really returned. Therefore:
1. Is it true that the initial search is flawed as I described?
2. If so, is it true that I can't reach the detailed search without
wasting time with a dummy initial search?
</div>

Discussion is locked

- Collapse -
Answer
How about Wildcards?
Dec 30, 2011 8:00AM PST

I'm not a Mac user myself but I wonder if Search in a Mac would be the same in Windows and Linux, etc, using wildcards.

When just searching for 1997, the search is only for a file with that name, or a file with that name at the beginning, as you have found. Your search expression didn't specify anything other than the first 4 characters of the file you wanted to look for.

For example, using *1997* (that's an asterisk then 1997 then an asterisk), would that find all files that contained 1997? The asterisk tells the OS to search for any file that has that 1997 in it.

Just a thought.

Mark

- Collapse -
Answer
Searching
Dec 30, 2011 9:01AM PST

Surprisingly, the search box inside the folder is NOT searching just the folder, it is searching the entire machine.
Once you start typing the item you want to find, notice that "Searching "This Mac"" appears in the menu bar.

- Collapse -
Answer
Refining Spotlight searches
Dec 30, 2011 9:40AM PST

As suggested by mrmacfixit, you can use Cmd-F as an alternative to Spotlight but you can just as easily refine the search in Spotlight.
Start by typing 1997 in the Spotlight search field.
When the results begin to appear in a window, you will notice on the right-hand side of the results box a button for 'Save' and a + sign. Click on the + sign and select the Kind of file you are looking for as 'Image'. Click the + sign again and change to Name and select 'Contains'.
Make other choices as desired to get what you want.
Hope that helps,
centurion48

- Collapse -
Answer
And one other tip
Dec 30, 2011 10:19AM PST

And one other tip. I believe since at least 10.5, but near positive it's in 10.6 and later, you can save searches to the side panel. So if you frequently want to find files with 1997 in the name, after you go through the process of refining the search parameters, you can then save that search to come back to it later with little more than a mouse click or two.

And I tested the wildcard idea, which doesn't seem to work. I'm not such a glutton for punishment that I'll go through all the sed/Perl regex possibilities to see if any of those work.

- Collapse -
Answer
Searching desktop folders - Answers commented on
Dec 30, 2011 11:52AM PST

Thanks for the 4 answers; allow me to comment on them all in one message.
1. Asterisks-- a good idea since many search engines recognize this. Alas, in MAC OS 10.6(Snow Leopard),
the folder search doesn't.
2. mrmacfixit says 2 things. The first seems wrong in that the initial search, even when I enter a
single letter, searches only my folder, not the whole computer. Perhaps this is because,
in Finder preferences(Advanced), I changed the default option to "Search the current folder".
The second thing is helpful. Command-F, after opening the folder, does take me immediately
to a detailed search, so I'll use it from now on.
3. Centurion seems to suggest what I'm already doing-- going to the detailed search in the standard way. I
do these searches many many times, so the standard way is too slow.
4. Jimmy has a good idea, but I neglected to say that my search is different each time, so I can't save
a standard search.