Wildcard search in Yosemite Finder?

Discussion in 'OS X Yosemite (10.10)' started by shankar2, Jan 8, 2015.

  1. shankar2 macrumors 6502

    Joined:
    Jun 7, 2009
    #1
    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!
     
  2. T'hain Esh Kelch macrumors 601

    T'hain Esh Kelch

    Joined:
    Aug 5, 2001
    Location:
    Denmark
    #2
    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.
     
  3. shankar2 thread starter macrumors 6502

    Joined:
    Jun 7, 2009
    #3
    Thanks but what about the search box in the Finder window of Yosemite?
     
  4. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #4
    It works just like Spotlight. Just type in name:test for example and it will find all file names that contain the word test.
     
  5. leman macrumors 604

    Joined:
    Oct 14, 2008
    #5
    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*)
     
  6. shankar2 thread starter macrumors 6502

    Joined:
    Jun 7, 2009
    #6
    Hi Leman but name:name won't fine me files with name say "filemame.jpg" anyway to find this file in finder search?
     
  7. chown33, Jan 10, 2015
    Last edited: Jan 11, 2015

    chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #7
    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.
     
  8. NoBoMac macrumors 6502a

    Joined:
    Jul 1, 2014
    #8
    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 {} \;
     
  9. shankar2 thread starter macrumors 6502

    Joined:
    Jun 7, 2009
    #9
    Well too bad the finder window search can't search for strings within a file name :(
     
  10. NoBoMac macrumors 6502a

    Joined:
    Jul 1, 2014
    #10
    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:
     

    Attached Files:

  11. dsemf macrumors regular

    Joined:
    Jul 26, 2014
    #11
    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
     
  12. chown33, Jan 11, 2015
    Last edited: Jan 11, 2015

    chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #12
    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.


    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".
     
  13. shankar2 thread starter macrumors 6502

    Joined:
    Jun 7, 2009
    #13
    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?
     
  14. KALLT, Jan 12, 2015
    Last edited: Jan 12, 2015

    KALLT macrumors 601

    Joined:
    Sep 23, 2008
    #14
    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).
     

    Attached Files:

  15. shankar2 thread starter macrumors 6502

    Joined:
    Jun 7, 2009
    #15
    Thanks guys things are fine now at last I can do advanced search on my mpro
     

Share This Page