[Mac] Folder Action with Automator

Running FileBot from the console, Groovy / FileBot scripting, shell scripts, etc
Locked
User avatar
rednoah
The Source
Posts: 19365
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

[Mac] Folder Action with Automator

Post 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.

Image




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. ;)

Image
:idea: Please read the FAQ and How to Request Help.
Locked