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

Ambrosia7177

macrumors 68020
Original poster
Feb 6, 2016
2,215
433
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?
 
Yes:

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

    Name matches 03

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?
 
Hmm… try this instead:

Filename matches 03


"Filename contains 03" worked for me.


Untitled.jpg
 
"Filename contains 03" worked for me.


View attachment 623831

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.
 
But it isn't working for me.

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

View attachment 623837

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...
View attachment 623838

Then I click on "Test" and I see...
View attachment 623839

As you can see, this is not working for me.

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:
 

Attachments

  • u1.jpg
    u1.jpg
    18.5 KB · Views: 127
  • u2.jpg
    u2.jpg
    33.3 KB · Views: 123
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:

Okay, I see what you are doing now.

That worked.

Thanks!
[doublepost=1459348230][/doublepost]jdelgado,

Once I filter on what I am looking for, is there a way to copy (or move) those files to a new folder?
 
Okay, I see what you are doing now.

That worked.

Thanks!
[doublepost=1459348230][/doublepost]jdelgado,

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

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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.