Automator: Missing Conditional "Does Not Contain"

This is "for the record" since the previous discussions about this topic were archived (https://discussions.apple.com/thread/2143634?messageID=10126735#10126735?messa geID=10126735) and there was no published solution. Most people probably figured this out before spending 20 minutes with Google and the Apple docs 😉


I too was missing the "does not contain" option when configuring Filter Finder Items to include files with names that contained "XX" but did NOT contain "-web". In fact, I wrote a simple AppleScript solution to be placed in a Run AppleScript action that did this. Then I looked into writing an Obj-C an Automator action using pre-built (in IB) Predicate Editor, but there was still not an operator for "DOES NOT CONTAIN" but only "CONTAINS" because there is no String Comparison operator within predicate programming.


The "answer" is to simply create and run the Filter Finder Items action twice, consecutively. The first action is configured to find files where ALL of the filenames contains "XX". The immediately-following Filter Finder Items action then only finds files where NONE of the filenames contain "-web". Duh.


User uploaded file

Posted on Aug 22, 2012 9:41 AM

Reply
2 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.

Automator: Missing Conditional "Does Not Contain"

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