Search for substring in Filename

Discussion in 'Mac Basics and Help' started by Texas_Toast, Mar 28, 2016.

  1. Texas_Toast macrumors 6502

    Texas_Toast

    Joined:
    Feb 6, 2016
    Location:
    Texas
    #1
    In Mountain Lion, is there a way to search for a substring in Filenames in Finder?

    In the sample files below, I want to find all MP3's that happened in March, so I only want files with an "03" in their filenames.

    MyFavoriteShow_2016-03-01.mp3
    MyFavoriteShow_2016-02-01.mp3
    MyFavoriteShow_2016-01-01.mp3
    MyFavoriteShow_2015-03-01.mp3
    MyFavoriteShow_2015-02-01.mp3
    MyFavoriteShow_2015-01-01.mp3
    MyFavoriteShow_2014-03-01.mp3
    MyFavoriteShow_2014-02-01.mp3
    MyFavoriteShow_2014-01-01.mp3

    Is there an easy way to do this in Finder?
     
  2. richard2 macrumors regular

    richard2

    Joined:
    Oct 21, 2010
    Location:
    England, United Kingdom
    #2
    Yes:

    1. Press command-F.
    2. Enter the following search query (below the toolbar):

      Name matches 03
     
  3. Texas_Toast thread starter macrumors 6502

    Texas_Toast

    Joined:
    Feb 6, 2016
    Location:
    Texas
    #3
    When I did that from the directory containing the files I described, the results seemed rather random. Some matched my substring, but most had no relation.

    Is there a different or better way?
     
  4. richard2 macrumors regular

    richard2

    Joined:
    Oct 21, 2010
    Location:
    England, United Kingdom
  5. Texas_Toast thread starter macrumors 6502

    Texas_Toast

    Joined:
    Feb 6, 2016
    Location:
    Texas
    #5
    No luck!
     
  6. jdelgado macrumors regular

    Joined:
    Oct 25, 2009
    #6
    "Filename contains 03" worked for me.


    Untitled.jpg
     
  7. Texas_Toast thread starter macrumors 6502

    Texas_Toast

    Joined:
    Feb 6, 2016
    Location:
    Texas
    #7
    But it isn't working for me.

    I created this directory called "Test" and filled it up with some dummy files...

    upload_2016-3-29_14-50-30.png

    Again, I want all files that were recorded in March.

    I follow the advice above and enter into Finder "Filename matches 03"

    Immediately in Finder I see...
    upload_2016-3-29_14-53-8.png

    Then I click on "Test" and I see...
    upload_2016-3-29_14-53-41.png

    As you can see, this is not working for me.
     
  8. jdelgado macrumors regular

    Joined:
    Oct 25, 2009
    #8
    Type cmd-F or select "Find" from the menu. You should get something like this


    Then, select from the menu "filename" and "contains" and type the string:
     

    Attached Files:

    • u1.jpg
      u1.jpg
      File size:
      18.5 KB
      Views:
      29
    • u2.jpg
      u2.jpg
      File size:
      33.3 KB
      Views:
      33
  9. richard2 macrumors regular

    richard2

    Joined:
    Oct 21, 2010
    Location:
    England, United Kingdom
  10. Texas_Toast thread starter macrumors 6502

    Texas_Toast

    Joined:
    Feb 6, 2016
    Location:
    Texas
    #10
    Okay, I see what you are doing now.

    That worked.

    Thanks!
    --- Post Merged, Mar 30, 2016 ---
    jdelgado,

    Once I filter on what I am looking for, is there a way to copy (or move) those files to a new folder?
     
  11. jdelgado macrumors regular

    Joined:
    Oct 25, 2009
    #11
    Glad I could help.
    You can select the find results (or select all results, cmd-A) and then drag them or copy (cmd-C) to the new folder.
     

Share This Page