Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How do I create a multiple search/delete with automator

Task:

Clean a folder from obsolete files. Go to sub directories and clean files in that subfolder.

Problem:

When I want to delete selected files with automator I try to create a search and then use "move finder Items to trash" but after choosing that action I cannot find a way to do a second search and delete.

I can make a shell script to do this all but I try to do this in the GUI of automator.

Does anybody know how to return to the start folder and do a new search / delete action?

macbook pro, Mac OS X (10.6)

Posted on Nov 30, 2012 3:19 AM

Reply
3 replies

Nov 30, 2012 3:53 AM in response to rjonk

I apologise in advance for this post, because I know how annoying it is when you ask a question and instead of a reply you get a 'why would you want do that?' But...


If you know how to do this in a shell script, why would you bother doing it in Automator and applescript, which is only converting those commands into the shell script commands you already know how to write?

Nov 30, 2012 2:50 PM in response to softwater

Somebody else needs to do the cleaning up multiple times and knows how to select the right mouse button and select a folder action as service or can drag a group of files in a folder with folder actions on it, but dont know how to use the terminal "gui". So I need a way to make it simple to do a multiple search and delete this way.

Nov 30, 2012 3:24 PM in response to rjonk

I found myself one way to do it with a variable. But maybe this can be quicker I don't know yet..

  • Create App
  • Select the folowing items in the Library: "Ask for finder items"
  • Set value of Variable with name "storage"
  • Get Folder Contents
  • Filter Finder Items (fill in the search criteria)
  • Move Finder Items to Trash
  • Get Value of Variable (storage)
  • Get Folder Contents
  • Filter Finder Items (fill in the search criteria)
  • Get Folder Contents (sub folder search)
  • Filter Finder Items (fill in the second search criteria)
  • Move Finder Items to Trash

How do I create a multiple search/delete with automator

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