Mac finder can be used to find files on Mac or in a specific folder. By default search is done on file contents. Sometimes we just want to search files having certain string in the name. Here are quick steps to search files by name (substring) using Mac Finder:
Pre-requisite for searching files by name in Finder
For the purpose of this article we will create two test files. Create a directory tmp and create two files in it. Name first file hello.txt and put the following content in it:
Create second file file1.txt with the following content:
Steps to do file name search in Finder
Open Finder, select the folder tmp created above and type hello.txt in search box. It should prompt you to search only in file (Name matches:) as shown below:
Note that by default both files (hello.txt and file1.txt) are being shown in results as hello.txt has matched files name in one file and content text in another.
Select “Name matches: hello.txt” option. This will search hello.txt only in file name. Here are the results for name search.
Note that this time (Name search) only hello.txt is appearing in search results.