1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Triggering folder action on dropbox folder?

Discussion in 'Mac Programming' started by ronswanson, Aug 7, 2013.

  1. macrumors newbie

    I am trying to set up a Folder Action to act on any file added to a Dropbox folder on my laptop but the action is not triggered when Dropbox deposits a new file in that folder. If I move a file by hand into that folder, the Folder Action works!


    (What I'm really trying to do is this: automatically re-encode videos downloaded to Dropbox's Camera Uploads folder on my laptop to 480p and copied to another local folder on my laptop. All of this is easy using Folder Actions but it will not trigger!!)
  2. macrumors regular

    You may need to try a different tactic like setting up a cron job with a script to monitor the folder, check for new files, and then do the conversion.

    Alternatively, it may be easier just to set up a cron job or rsync to move the file from the dropbox folder to another staging folder, and then have the folder action trigger there, assuming that rsync or a cron job+move file combo triggers folder actions
  3. macrumors newbie


    huh.. thanks! is that because this is a known issue with dropbox and folder actions?
  4. macrumors regular

    I don't know, honestly. I would hazard a guess that whatever process monitors a folder for folder actions is NOT the process that dropbox uses to write files. Or more specifically, folder actions are probably handled by the finder process (which is always running), but dropbox just writes to the folder directly using the underlying os filesystem hooks and so finder never gets notified.

    It's possible that rsync or a cronjob copy wouldn't work either. You may need to write a full script to check for new files and then do the processing, and set that up on a cron job.

    There is also a program called Hazel that is similar to folder actions that might work the way you want.

    Food for thought....

Share This Page