As the titles indicates, I would like to search a file in a particular folder, and its subfolders, through Spotlight. Is it possible to do that in Spotlight? If so, how can that be done?
2 Answers
Short answer: No, you can not.
Spotlight is designed to be the "central search hub" of your Mac. So whenever you type in something, it will search everything (except "blacklisted" folders and file types that you can set within System Preferences as well as any data from all other user accounts and connected servers unless your account has permission to view them) on your Mac internal storage as well as any additional connected media storage devices.
If you want to search into a specific folder and its subfolders, you will need to go to the actual folder in Finder first. In this example, the selected folder will be "Treehouse"
Then, click on the search bar (typically on the top-right corner of the window) and type in whatever you need to search for. In this example, the term will be "iTunes".
Finally, you will see a gray bar below the Finder toolbar. Select the folder name within the gray bar (if it hasn't been selected already) and it will limit the search to just the files and folders within the said folder.
-
I must be doing it wrong because it always searches ENTIRE file system rather than just "Developer" directory. Commented Jul 6, 2018 at 10:20
-
1"select the name of the folder on the same bar" how do this exactly? Commented Jul 6, 2018 at 10:22
-
You need to start typing in what you want to search for on the search bar inside Finder. Then you should see a gray bar that says "Search:", "This Mac", and then the name of the folder (in the example case, "Developer"). You will want to select the option of the same name as the folder you're searching in.– chrisjrCommented Jul 6, 2018 at 23:06
-
I found this confusing as well. In the dialog window, where you see: Search: This Mac "Developer", click on "Developer".– Bob HornCommented Aug 27, 2018 at 13:21
-
I've updated the answer in order to explain it better. Hope this helps.– chrisjrCommented Aug 29, 2018 at 0:16
From anywhere in the Finder, pull down the Finder menu and choose “Preference” Click on the “Advanced” tab and pull down the menu under “When performing a search:”, selecting from the pulldown menu “Search the Current Folder” instead