Sample Header Ad - 728x90

Smart folder filter "does not contain"

15 votes
4 answers
5800 views
# Smart Folder Exclude Folder Ultimately I want the result of this find command to be a smart folder. The criteria aren't that complicated: - name should be "README.md" - type should be file - path should not contain "node_modules" find /Users/me/Documents -type f -name README.md -not -path "*/node_modules/*" The problem is that the smart folders criteria operator list seems to be lacking a does not contain option. The available options are: - matches - contains - begins with - ends with - is - is not Is it possible to accomplish this and if so then how? ## Edit 1 I found that by holding the option key I am able to add a negation clause to the smart folder search criteria but I cannot seem to successfully exclude the node_modules folder. It is unclear which criteria to use but none of the ones I have tried seem to work: - Document Container - Containing Folder Names - Folder Name I have tried combining these with the following operators: - contains - matches and with the following terms: - node_modules - *node_modules* in case it supports wildcard searches. I have tried all combinations of the above filters, operators and terms. The documentation is so poor on the subject. enter image description here
Asked by km6zla (251 rep)
Jun 4, 2014, 02:12 AM
Last activity: Nov 16, 2020, 02:10 PM