You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Use fullpath in search criteria

Hi,


I'm trying to search for recent files in only some specific folders


Is there a fullpath property that I can use?


Here's what I tried, I used the filename just to show what I'd like to achieve. I couldn't find a property which contains the full path.

Is there a workaround for this?


MacBook Pro 16″, macOS 12.6

Posted on Oct 15, 2022 12:19 AM

Reply
12 replies

Oct 15, 2022 8:44 AM in response to Barney-15E

Barney-15E wrote:


Use the "Other" option and add a "Document Container" criteria
I don't believe that has ever worked. I think it's a placeholder for if they ever try to implement a folder as a search criteria. It's existed for years, but has never worked.

Indeed you are correct. As the Apple Support Community Terms of Use say, always test your answer.

Oct 15, 2022 12:27 AM in response to tunisoft

It seems to me that you are making it more complicated than it needs to be.


If you start the search from a certain folder instead of Recents, you can just click to search only inside that folder.


And if it is a bit more complex, ie if you want to search on the contents, say, of only folders A, B and C, and these folders are scattered somewhere in your drive: make a new folder D, put aliases of A, B and C inside it (command-option-drag) and search inside D.

Oct 15, 2022 6:01 AM in response to tunisoft

I was hoping it would work with aliases, since they are easier to create in the Finder. All is well, though, if instead of aliases we use symlinks.


Here is one way to create symlinks from folders A, B, C inside another folder D:


1) open Terminal

2) type “cd “ without the quotes but with a trailing space; do NOT press enter

3) Drag folder D over the Terminal window (it expand its full path into the command line)

4) press enter to execute the command

5) type “ln -s “ again with a trailing space and no enter

6) drag folder A iver Terminal

7) type a period, and then press enter

(the command line will look line this:

ln -s /Users/path/to/folderA .

)

repeat steps 5)-7) for each folder you want to make a symlink for

Oct 15, 2022 7:02 AM in response to Luis Sequeira1

Thanks for your reply. Yes, I tried symlinks as well, it didn't follow their content.

I was hoping to make it work on finder because I benefit from this in the open file dialog especially

I'll see if there a scripting way of doing it


I'll also check other 3rd party solutions or try to suggest the addition of a full path property

If you know where I can make such a request, please let me know


Thank you very much

Oct 15, 2022 8:45 AM in response to etresoft

Use the "Other" option and add a "Document Container" criteria

I don't believe that has ever worked. I think it's a placeholder for if they ever try to implement a folder as a search criteria. It's existed for years, but has never worked.


I did manage to get a couple of results, one was an iCloud Synchronization file that really didn't exist.

I did find some in Preview's iCloud Drive folder. When I looked at the metadata, it had kMDItemDocumentContainer set to the folder name. So, assuming the metadata gets set by something, it would work. However, I don't know of anything that does set that particular metadata.

Use fullpath in search criteria

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.