I spent some time experimenting with building a Folder Action for my Desktop folder. However, it seems like it's running twice.

I might have created the Folder Action more than once. How can I find out what Folder Actions I have attached to my Desktop folder? I can't see anything in Automator to list them.


As an alternative, this one-line snippet of AppleScript will return all folders with folder actions applied them:

tell application "System Events" to get the path of every folder action
    --> {"/Users/CK/Scripts/AppleScript/scripts", "/Users/CK/Downloads", ...}

This one might be handy too, because it lists the actual path to the scripts or Automator workflows monitoring each of your folders...

tell application "System Events" to get the POSIX path of every script of ¬
        (every folder action where class of its scripts contains script)

...or a specific folder:

tell application "System Events" to return the POSIX path of every script of ¬
        (every folder action where its path contains "/Users/CK/Desktop" and ¬
        enabled of scripts contains true)
|improve this answer|||||
  • That is handy — it took me ages to have any idea where the workflow files are actually saved. (Usually ~/Library/Workflows, right?) – Paul D. Waite Jun 7 '19 at 8:25
  • For folder actions, usually ~/Library/Services (on High Sierra, at least). – CJK Jun 7 '19 at 8:29

Open the Folder Actions Setup app. This lists folders with actions, and the actions that each folder has assigned to it.

You can add and remove actions from folders here, and enable/disable folder actions globally.

|improve this answer|||||

Here is another option you may find useful.

This AppleScript code works for me using the latest version of macOS Mojave.

tell application "Folder Actions Setup"
    set everyFolderAction to a reference to every folder action
    set folderNamesWithAttachedFolderActions to name of everyFolderAction
    set pathToFoldersWithAttachedFolderActions to path of everyFolderAction

    if "Desktop" is in folderNamesWithAttachedFolderActions then
        tell folder action "Desktop"
            set scriptsAttachedToDesktop to ({name, path} of scripts)
        end tell
    end if

end tell
|improve this answer|||||

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .