[Mac] Folder Action with Automator

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
User avatar
The Source
Posts: 11151
Location: Taipei

[Mac] Folder Action with Automator

Postby rednoah » 29 Jun 2016, 11:17

Mac OS X Automator is a great built-in tool for automating various tasks. Making custom context menus for Finder (i.e. Service) and watching folders for new files (i.e. Folder Action) for console tools like FileBot is straight-forward.

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 "$@"
  7. Save your new workflow and close Automator
  8. Done! Newly added files will be processed fully automatically!

Finder Service: Automated Media Center

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

My (very excellent) support depends on Windows Store and Mac App Store sales and PayPal donations. Paying users, donors and everyone who contributes to FileBot in one way or another will get the very best support.


Please read the FAQ and How to Request Help. Donate if you'd like some extra developer love. :ugeek:

Return to “Scripting and Automation”

Who is online

Users browsing this forum: No registered users and 1 guest