mdfind , find an exact match, nothing more nothing less

So I am trying to find the folder "my folder" The problem is the below finds it but also finds other folders that contain "my folder"


 mdfind "kind:folder my folder"


Result:

/Volumes/ExternalHD/my folder

/Volumes/ExternalHD/Back up of my folder

/Volumes/ExternalHD/Back up of my folder2


As you can see it finds all occurrences to it. Can you specify an exact match?


thanks


Matt

Posted on May 15, 2019 6:22 AM

Reply
Question marked as Top-ranking reply

Posted on May 15, 2019 7:12 AM

mdfind -literal "kMDItemDisplayName == \"my folder\"" "kind:folder"

Similar questions

8 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

mdfind , find an exact match, nothing more nothing less

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