Use Automator to delete folders with specific names

Hello, I am new to Automator and have been trying to set up a simple automation that will go to a specific folder and delete folders contained within that folder that start with a specific name.

  1. I use Get Specific Finder items and navigate to the folder.
  2. Then use Filter Finder Items and list the folder names I want to delete.
  3. Then use Get Selected Finder Items
  4. & finally I use Move Finder Items to Trash.

I get green lights up until the Move Finder Items to Trash. At that point I get the error message "Move Finder Items to Trash was not supplied with the requested data.". Can someone tell me what I am doing wrong?

Thanks in advance!

The Get Specified Finder Items action will only return those items, and the Get Selected Finder Items action returns the current selection in the front Finder window. Your workflow isn't getting anything to move, unless there happens to be a current FInder selection.

You would need to do something like use Get Folder Contents on the specified folder(s), and then filter those items for folder names. You may also be able to use Find Finder Items to combine the getting and filtering actions. To see what a specific action is returning, you can view its result.

Awesome! Thanks I got it to work!

Use Automator to delete folders with specific names
 
 
Q