I've been trying to make an Automator droplet that removes files of a particular extension from a directory. My Workflow has 3 actions (when I'm not debugging):
- Get Folder Contents (Repeating for each subfolder)
- Filter Finder Items (File extension is "part")
- Move Finder Items to Trash
It's #2 that seems to be giving me problems. No matter what I do, no files ever pass through its filter. When I expand the results for Get Folder Contents and any other Finder actions, I always see files in the results. But even when I specify the most permissive filters, this action never produces anything.
If you want to debug this, just insert a new action up top: Get Specified Finder Items, dropping on any directory that has any files within it - although technically the "Filter Finder Items" should also be able to return folders.
I'm now on Lion, and seeing the exact same behavior. I also tried replacing step 2's criteria with "Name ends with 'part'" but that didn't make a difference either. I ultimately ended up writing an AppleScript that accomplished the same task (see below).