Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to create an automator based workflow whereby I create archives of folders but exclude certain files from the final archive. I would also like to specify the files or folders to exclude (e.g. ".cvs" or ".git" or ".psd" etc).

Here's how I have currently tried to do it, but cannot get step2 below working:

  1. I specify a folder to scan and archive.
  2. Automator/script recursively filters out certain files which I can specify (e.g. ".cvs" or ".git")
  3. Automator creates an archive of the remaining files from step2.

Im certain there must be an easy way of achieving this with automator - any assistance would be appreciated.

share|improve this question
Are you ok calling a script in Automator (or just doing this through a script)? – jmlumpkin Apr 8 '11 at 21:52
up vote 2 down vote accepted

Automator won't be enough to do this.

You'll have to devise an applescript (or some other kind of script) to do the filtering, since the automator action "Filter Folder Items" will not work recursively. Any folder will not have the undesired extensions so will be added, even if the folder contains files with those extensions.

share|improve this answer
I kinda think this should be a comment since it doesn't give a functioning answer. It is good info, just not a full answer IMO. – Nathan Greenstein Apr 8 '11 at 18:58
Oh well. I wish I had known this before spending so much time trying to do this. I will leave the question open for a while, in case there's people out there that do know of a way. If there isn't any solution then I guess @ghoppe is right and I will select this as the corrent answer. hope – mozami Apr 8 '11 at 20:01
You can execute shell scripts or AppleScripts from Automator. So, don't abandon Automator altogether. You'll need to supplement the drag-and-drop stuff, but you can do it all from an Automator workflow. – Nathan Greenstein Apr 9 '11 at 1:29
Yep, Nathan's right. If you're using Automator for your workflow, you can still use it to run another script to do what you want. When I said it won't be "enough" I didn't mean you'd have to abandon it. – ghoppe Apr 9 '11 at 18:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.