Automator: detect on folder change, and copy to DropBox

Is it possible to build an Automator workflow and attach it to a folder so that the action of adding or changing a file to or in that folder automatically copies its (newly changed) folder's contents to my DropBox folder, please?


That is, I want automatically to back up to DropBox files which are outside the ~/Dropbox folder… an alias of the folder in question doesn't work?


Thanks!

iMac, OS X Mountain Lion (10.8.2), Clean machine... no haxies; no Microsoft etc

Posted on Mar 4, 2013 7:34 AM

Reply
4 replies

Mar 4, 2013 1:43 PM in response to Mark Sealey

Hi,


Are you saying you can't create an alias to your Dropbox folder? That works ok for me.


You can also create an Automator folder action that will move or duplicate any items dropped into the attached folder from that folder to Dropbox.


To do this for a move, create the target folder (say on your desktop), then launch Automator.


You'll be asked to choose a type for your document. Choose Folder Action.


At the top of the workflow you specify which folder the action will be attached to. Mine is called Dropbox Drop Folder. You then drag a "Move Finder Items" action into the workflow window, and point it to Dropbox. Mine replaces existing files. You end up with something like this:


User uploaded file


Save and close the workflow. Anything dropped into your target folder will be moved to Dropbox.


If you wanted to duplicate the items before sending them to Dropbox, it would look like this:


User uploaded file


But the files moved to Dropbox would all be renamed "Copy of..." + the name of the original file.


Now the not-so-good news. Automator folder actions can only be triggered by adding items to the target folder. Editing the item once it's in the folder won't trigger the folder action again - you'd have to move it out, change it and move it back in again.


AppleScript folder actions are a bit more flexible - they can be triggered by moving items out of a folder, changing the size of the folder window, opening the folder or closing it as well as by adding items. But even then, as far as I'm aware there is no way of triggering a folder action by changing an item that's already in the folder.


Hope this helps.

Mar 4, 2013 1:49 PM in response to HD

Thanks, HD!


Yes, I eventually set up an Automator Workflow - as you have suggested.


But, as you say, I found that the only way to trigger it is to drag a file out and back in. And even that doesn't always work.


I can certainly create an alias to the source from ~/Dropbox. But it's that binary that DropBox uploads, not the contents of the folder to which it points.


Your help appreciated!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Automator: detect on folder change, and copy to DropBox

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.