How to Create an Automator Script to Back Up to Dropbox

Ron Burch figured out how to create an Automator Backup script for me so that I could just click a sidebar button and back up my Feeder files to Dropbox. Here is how he created that Backup Script.

Open Automator

media_1294529667014.png

Launch the Automator from your Applications Folder

Choose the Workflow Template

media_1294529690738.png

Click Workflow, then Choose.

The Action Pane

media_1294529708988.png

Select Files and Folders

Get Specified Finder Items

media_1294529747596.png

First we have to tell Automator what files we want to back up, so click on Get Specified Finder Items and then drag it to the pane on the right. It should look like this image when you’re done.

Add Finder Items

media_1294529848246.png

We need to tell Automator where the files normally live that we want to back up to Dropbox so click on the Add… button

Navigate to the File Location

media_1294530109123.png

Select your file that you want to have backed up. Note that you can add several files or folders to be copied. Click Add. Repeat this process if your files are in different locations.

Copy Finder Items

media_1294529764117.png

Next we need to tell Automator what to do with those items. In our example we want the specified files copied to another location. Note that we are copying not moving these files. Again using Files & Folders, select Copy Finder Items and drag to the right pane as the next step.

Select Destination

media_1294529796753.png

We have to tell Automator where to put the files when the files are copied, so click on the pulldown next to To: and choose Other.

Navigate to the Destination Folder

media_1294529823657.png

In my example I want to copy files to my Feeder folder inside my backup folder inside Dropbox.

Replace Existing Files

media_1294529839888.png

Under Copy Finder Items, make sure you select Replacing existing files so that you won’t have to click Replace every time you run your script.

Test Run

media_1294530176932.png

You should now see your Finder items, the place they’re going to be copied to and replace existing files selected. Click Run to test out your Automator Script.

Successful Test Run

media_1294529979815.png

If your test run is successful you should see green check marks next to each step. If you don’t get happy check marks, go back through the steps to see where you might have made a mistake.

Save Workflow

media_1294536405271.png

First we’re going to save your Workflow so if you ever want to edit it you can just reopen it in Automator. Make SURE that Workflow is chosen as the File Format.

Next Save As

media_1294536435936.png

We’re going to save again, but this time choose Save As…

Save Application

media_1294536894574.png

This time chose Application from the pulldown and save to your Applications folder.

Add Script to Finder Sidebar

media_1294537173988.png

The last step is optional, but I really like to have my script right in my Finder Sidebar so that I can click on it any old time to run it. Now whenever you’ve been working on your file a bit and you want a quick backup to Dropbox, just click your script once in the sidebar and badabing badaboom you’re done!

22 thoughts on “How to Create an Automator Script to Back Up to Dropbox

  1. […] How to Create an Automator Script to Back Up to Dropbox […]

  2. Anonymous - June 6, 2017

    Very nice! works great. First time I’ve used Automator. Thanks

  3. Imre - July 31, 2017

    Thank you very much for this amazing tutorial! I need to backup important files to an external hard drive and with this tutorial it was very easy to do, even without ever using Automator before (I didnt even know about it…).

  4. Ulf Nilsson - August 5, 2017

    Perfect! Thank you very much…

  5. Anonymous - September 18, 2017

    thanks

  6. Anonymous - January 10, 2018

    Perfect! Thank you!

  7. Anonymous - February 3, 2018

    After Saving as a Workflow, I do not get the option to “Save As” in “File” under Automator

  8. Anonymous - February 6, 2018

    Solution to my problem so that others can benefit – hold down the Option key while selecting File to see the Save As option (I was unaware of this “trick” and I’m sure many other already knew it). And holding down the Command key allows you to drag the .app file to your Finder sidebar.

  9. darren - March 22, 2018

    I can not get anything to copy, I just get this error message. The action “Copy Finder Items” encountered an error:

  10. darren - March 22, 2018

    Nevermind… I got it to work. Now anyway to add a feature to just update modified files?

  11. Anonymous - July 11, 2018

    I want to copy a newly generated file from a server location to my local. How can I do that?

  12. Anonymous - July 24, 2018

    Awesome. Much appreciated.

  13. Anonymous - January 16, 2019

    any thoughts on how to save the last x number of versions?

  14. Jack Boyer - April 20, 2019

    Is there a way to get a progress bar or pop-up when finished?

  15. Bons - June 8, 2019

    I’m looking for a solution where the folder will update itself as I put new files into the other folder. Is there a way to set it up so I don’t have to keep clicking it to update?

  16. podfeet - June 8, 2019

    Have you tried using Hazel, Bons? It’s designed to watch a folder and then do operations on what changes it observes. That might be more what you need.

    You can find Hazel at https://Noodlesoft.com

  17. Alyssa - October 9, 2019

    @ Jack Boyer, add a Display Notification

  18. Dexter - January 28, 2020

    Thanks. Using the script, copying a file to Dropbox works great the first time. However, on subsequent running of the Automator application the Finder reports this:

    “The action “Copy Finder Items” encountered an error: “The file “My File” couldn’t be saved in the folder “My Special Files”

    When I go back to the Dropbox folder indicated above, there •seems• to be a new copy, but it is empty. (zero k).

    Any help appreciated.

  19. Allison Sheridan - January 28, 2020

    Hey Dexter – as you can see from the screenshots this is an ancient script but I don’t see why this shouldn’t still work. The only thing I can think of is maybe it’s a permissions issue from macOS Catalina if you’re running that?

    If I can get Automator to behave itself (it crashed and now won’t launch!) I’ll run a test myself.

  20. podfeet - January 28, 2020

    Ok, Dexter, I ended up having to reboot to get Automator to run again but I wanted to test this. I was able to make the folder in Dropbox, and repeatedly get the copy script app to work. With the “advances” in macOS I did have to do a few different things from the tutorial, but they shouldn’t have changed the

    * hold down option key to see Save As in Automator to make the app
    * give the app I created permissions to see documents (Catalina-specific)

    Other than that it seems to work repeatedly for me.

  21. Ron - February 5, 2020

    Dexter, So I finally had some time to check into this, and I have to admit that I’m stumped. I didn’t have a copy of the original script, so I just followed the directions that you posted (probably better to do that anyway) and recreated it. Then ran it, multiple times, with different file types. I didn’t encounter any issues or error messages. The script seems to overwrite correctly, and did not see any problem with the copied file (no empty files). So it’s a bit of a mystery. It almost sounds as though there’s some kind of permissions issue with one or the other of the folders involved, maybe more likely on the Dropbox side. You might want to delete the source folder and the destination folder and recreate them to see whether the issue persists. I’m using the latest MacOS on a 13″ MacBook Pro of recent vintage (2019). Sorry I couldn’t be of more help.

  22. Baryy - May 19, 2020

    I’ve used this to back up a specific folder to a NAS – something which Time Machine cannot do! Thank you for your help 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top