Page 1 of 1

[Mac] Folder Action with Automator

Posted: 29 Jun 2016, 11:17
by rednoah
Mac OS X Automator is a great built-in tool for automating various tasks. Making custom context menus for Finder (i.e. Quick Action) and watching folders for new files (i.e. Folder Action) for console tools like FileBot is straight-forward.

Getting Started with the built-in Automator Workflows:

Starting with FileBot 4.8.5, FileBot now includes sample Automator workflows that you can install / uninstall via the Help menu.


Learn how to use Automator and create Automator Workflows yourself:

Folder Action: Automated Media Center

In this example we will use Automator to watch a given folder for new files and pass them on to FileBot: Automated Media Center for processing.

  1. Make sure that the filebot console tools are installed and working:

    Code: Select all

    /usr/local/bin/filebot -version
  2. Start Automator, click New Document and select Folder Action to create a new workflow
  3. Click the Choose folder combobox and select the folder you want to watch
  4. Drag a Run Shell Script (Utilities) action into your workflow
  5. Set the Pass input combobox to as arguments
  6. Paste following filebot command into your shell script workflow:

    Code: Select all

    /usr/local/bin/filebot -script fn:amc --output "$HOME/Media" --action duplicate --conflict skip -non-strict --log-file amc.log --def excludeList=".excludes" unsorted=y music=y artwork=y "[email protected]"
  7. Save your new workflow and close Automator
  8. Done! Newly added files will be processed fully automatically!

Finder Service / Quick Action: Automated Media Center

It's pretty much the same the above. I'll leave it as an exercise for the reader. ;)


Re: [Mac] Folder Action with Automator

Posted: 24 Apr 2017, 13:55
by Santaspascuas

I have followed all your steps, and when I run the Automator I get the following error message: "Illegal usage: output folder must exist and must be a directory: "Media".

I have a folder called Media (users/alvaro/Media) *alvaro is my name
Can you help me with this issue? It is my first time writing scripts and I have no clue of the proper spelling of the output route.

Re: [Mac] Folder Action with Automator

Posted: 24 Apr 2017, 13:59
by rednoah
Thanks for the post! Before a real human comes by, please make sure your report has all the following points checked:
  • What are you trying to do achieve? What's not working? What have you tried so far?
  • Include screenshots, logs or filenames (i.e. demonstrate the issue)
  • Include basic information (i.e. sysinfo output)
:idea: Please read How to Request Help and Fix Problems, Report Bugs, Get Features

Re: [Mac] Folder Action with Automator

Posted: 27 Apr 2017, 13:48
by Santaspascuas
Hi rednoah, apologies for the lousy help request. I have now read the FAQ and the How to Request Help section. I am sorry if I still make mistakes, because I am not English fluent and I dont understand many of the words and instructions. Here I go:
I am running automator on a Mac Mini, runnin OS Sierra 10.12.4.
I am trying to set Automator to look up the destination folder of Transmission (called "Transmission"), where all the movies and tvshows are dowloaded, and process the media files through Filebot to rename them and send them to the Media folder.
Hopefully, in a second stage I would like to send the renamed files to external hard drives and even get the subtitles, but I dont want to bother you even further.
I have installed the filebot console tools and checked that are working.
When I follow the instructions given by you in this post, I open Automator, I select new Document and select Folder Action.
I click the Choose folder combobox and select the folder "Transmission"
When I paste the shell script arguments exactly as you say ("$HOME/Media"), I get the following error:
If I write another route (/Users/alvaro/Media), the message is similar (quoting and unquoting):

I hope I've provided enough information.
Many thanks in advance!

Re: [Mac] Folder Action with Automator

Posted: 27 Apr 2017, 13:51
by rednoah
:!: It's a very bad idea to watch active download folders for changes. This could not possibly end well.

The best solution is to have Transmission call FileBot on completed downloads. Here's the setup instructions for that:

Re: [Mac] Folder Action with Automator

Posted: 30 May 2019, 13:12
by absoluthamburg
Hi there

just a small question regarding the quick action "rename with filebot". It works great overall but how I can change the language of the pulled title. In filebot it self I pull the German name but via the quick action it pulls the English name.

It is possible to change the language of the quick action?

Re: [Mac] Folder Action with Automator

Posted: 30 May 2019, 13:15
by rednoah
Yes, you can open the .workflow after installing the action to modify the command and add the --lang option.