Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with apple.stackexchange
scroll top