Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

shankar2

macrumors 65816
Original poster
Jun 7, 2009
1,020
54
Hi, I want to search like Windows in the Yosemite finder, things like *.jpg, or *name* etc.

Does Yosemite Finder have equal capabilities? (I'm not talking about spotlight search) Thanks in advance!
 

T'hain Esh Kelch

macrumors 603
Aug 5, 2001
6,474
7,408
Denmark
Yeah, Spotlight is pretty powerfull. You can use "Type:", "Name:" or "Kind:", and so on. If you google for spotlight tricks, or shortcuts, there are loads to find.
 

shankar2

macrumors 65816
Original poster
Jun 7, 2009
1,020
54
Thanks but what about the search box in the Finder window of Yosemite?
 

leman

macrumors Core
Oct 14, 2008
19,521
19,674
You can't use unix wildcards in the Finder search bar. Nor do you need them for your examples:

kind:jpeg (more flexible than *.jpg as it finds both *.jpg and *.jpeg files)
name:name (its the same as *name*)
 

shankar2

macrumors 65816
Original poster
Jun 7, 2009
1,020
54
Hi Leman but name:name won't fine me files with name say "filemame.jpg" anyway to find this file in finder search?
 

chown33

Moderator
Staff member
Aug 9, 2009
10,998
8,887
A sea of green
Hi Leman but name:name won't fine me files with name say "filemame.jpg" anyway to find this file in finder search?

The file name you posted doesn't contain the substring "name". You posted filemame.jpg. If that's a typo, it's an unfortunate one. If that's the actual filename, then it doesn't contain "name" so it's correct when it's not found.


To find all the files whose name contains the substring "foo", you should open a Find window and choose "contains" from the popup that appears in the "Name" selection criterion. That popup sits between the word "Name" (in its popup) and the input box where you enter the text to search for. The default is "matches", which is not the same as "contains".

If you choose "matches", then the search only shows the substring "name" if it:
- begins the filename.
- begins a word[1] in the filename (e.g. "some_name" or "some name")
- has "Name" in CamelCase (e.g. "someName")

There may be other criteria for "matches". The above are just what I discerned after looking at the difference in results between "contains" and "matches" on my disk.

The other options in the popup are "begins with", "ends with", and "is".

EDIT
[1] It's unclear exactly what is considered a "word". Punctuation and space definitely count as delimiters, i.e. they will make the text into separate words.
 
Last edited:

NoBoMac

Moderator
Staff member
Jul 1, 2014
6,285
4,973
Not as fast as Finder or Spotlight, but if looking in a "small" area (eg. Looking in Music folder), the "find" command is great. Bonus in that you have lots of options and can execute commands on the results.

So, for example, from a Terminal:

Code:
cd myfolder
find . -type f -name '*.jpg'

Will find all jpg files in the folder and all sub-folders. A list will print to the screen.

If you want to delete all the jpg in the folder:

Code:
cd myfolder
find . -type f -name '*.jpg' -exec rm {} \;
 

shankar2

macrumors 65816
Original poster
Jun 7, 2009
1,020
54
Well too bad the finder window search can't search for strings within a file name :(
 

NoBoMac

Moderator
Staff member
Jul 1, 2014
6,285
4,973
Well too bad the finder window search can't search for strings within a file name :(

Sure can. Just don't put in asterisks. Granted, might not filter down as well as "something*other", but it is what it is.

For example, I'm a recipe collector. If I want to find my favorite waffle recipe, or if I want to find a "pork shoulder" recipe:
 

Attachments

  • Screen Shot 2015-01-11 at 12.46.33 PM.png
    Screen Shot 2015-01-11 at 12.46.33 PM.png
    157.7 KB · Views: 1,661
  • Screen Shot 2015-01-11 at 12.46.17 PM.png
    Screen Shot 2015-01-11 at 12.46.17 PM.png
    176.7 KB · Views: 1,164

dsemf

macrumors 6502
Jul 26, 2014
441
114
Well too bad the finder window search can't search for strings within a file name :(

Works for me on 10.10.1.

  1. Cmd-F
  2. Set first dropdown to Name, the second one to contains. Enter string in the input field.
The matches option is a bit tricky. For example, it will find 'def' in file name "abc def", but not in "abcdef".

DS
 

chown33

Moderator
Staff member
Aug 9, 2009
10,998
8,887
A sea of green
...
The matches option is a bit tricky. For example, it will find 'def' in file name "abc def", but not in "abcdef".

Sadly, "matches" doesn't make its selection criteria clear. Worse, it's the default, instead of "contains".

I made a list, but I forgot "start of word", where "word" means "separated by punctuation or space". I've probably missed some more.


Sure can. Just don't put in asterisks. Granted, might not filter down as well as "something*other", but it is what it is.
The way to find "something*other" is to use multiple search criteria in a Find window.

1. Set the first criterion to Name contains "something".
2. Click the circular + button on the right.
3. Observe another criterion is added.
4. Set it to Name contains "other".

The resulting list of files will be those that contain both "something" and "other", with those substrings in any order.

To specifically find "something" at the start of a name, and "other" at the end, change the criteria to use "starts with" and "ends with".
 
Last edited:

shankar2

macrumors 65816
Original poster
Jun 7, 2009
1,020
54
I tried but cant seem to find files with say "abc" word within it. Mind you not begin or end with i selected filename contains abc but the files were not listed

What am I doing wrong?
 

KALLT

macrumors 603
Sep 23, 2008
5,380
3,415
I tried but cant seem to find files with say "abc" word within it. Mind you not begin or end with i selected filename contains abc but the files were not listed

What am I doing wrong?

Show us a screenshot of the Finder window with the query. Note that if you start typing in the Finder search box and then click on the + icon, it will only add a filter to your existing query. If it doesn't show the file with your initial query, then it will obviously not find it either when you apply another filter to it. Best way is to clear the search field once you've clicked on the + icon (use the delete key rather than clicking on the X icon to do this).
 

Attachments

  • Screen Shot 2015-01-12 at 17.59.12.png
    Screen Shot 2015-01-12 at 17.59.12.png
    63.5 KB · Views: 748
  • Screen Shot 2015-01-12 at 18.00.04.png
    Screen Shot 2015-01-12 at 18.00.04.png
    66 KB · Views: 681
Last edited:

shankar2

macrumors 65816
Original poster
Jun 7, 2009
1,020
54
Thanks guys things are fine now at last I can do advanced search on my mpro
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.