Macos – Is Automator’s “Filter Finder Items” action broken

automatormacmacososx-snow-leopard

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):

  1. Get Folder Contents (Repeating for each subfolder)
  2. Filter Finder Items (File extension is "part")
  3. 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.

Update

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).

Best Answer

check your spotlight privacy preferences. If the folder you are working with is not being indexed by spotlight, then the filter command will find nothing.

Related Question