Auto sync your Mac Desktop folder with DropBox

DropBox is a life saver. I can stash an extra copy of pictures, documents, and archival data in the cloud, and restore the files quickly if my laptop hard drive goes bust.

The thing is, most programs (on Mac or PC) have a default storage directory that is outside of DropBox. For instance, the default location for all documents created with Microsoft Word is the Documents folder. Now, I understand it’s possible to change the default save location for most programs, but that’s a lot of work. Instead, wouldn’t it be nice to simply drag your Desktop, Photos, Movies, or Documents folders into your DropBox to keep them updated automatically?

On a PC it’s easy, on a Mac it’s inception

On a PC, that’s pretty easy. You can easily change the location of your default folders. On a Mac however, it’s not possible easy to simply change the location of one content folder within your home directory, and the DropBox folder’s default location is inside the home directory (home directory inception anyone?).

Three simple steps for keeping your home folders backed up in DropBox

Trust me on this, there’s an easy way to keep your Mac Desktop, Documents, or any other folder in your home directory backed up in DropBox automatically… and it only takes three simple steps (and a couple terminal commands). I’ll show you how to backup your Desktop folder with DropBox in this example…

Create a desktop folder within your DropBox

If you don’t know how to create a folder, you might want to start here.

Screen Shot 2015-10-01 at 8.47.49 AM

Backup your old default Desktop folder

If you have files in your existing Desktop folder, don’t worry. We’re going to back up your existing folder so you can copy your old Desktop files to your new DropBox Desktop folder afterwards.

Simply open a terminal and enter the following command.

sudo mv desktop desktop.bak

Create a symbolic link to your new DropBox Desktop folder

If you’d like to read up on symbolic links, you can do so here. The long and short is that we’re telling OSX to create a link to the Desktop folder in your DropBox, but to treat the link as if it were the default Desktop folder itself. In this way, when you save things to your Mac Desktop, they’ll appear on your Desktop as before, but actually be stored in your new DropBox folder. Here’s how to do it…

ln -s /Users/mendel/Dropbox/Desktop/ ./Desktop

And, as they say… that’s all folks! If you give this little trick a try, let me know how it went. 🙂

10 thoughts on “Auto sync your Mac Desktop folder with DropBox”

  1. Hi Mendel, Thanks for this. After this, my finder saw Desktop as desktop.bak. Can I simply rename this as Desktop again? Could you post instructions to ‘reverse’ the action?

  2. hi there how do i undo this please?? My desktop folder is now called desktop.bak. All of the files that were on my desktop are in this folder and i can’t take screen shots because the can’t be saved anywhere…

  3. DO NOT USE THESE INSTRUCTIONS unless you are an advanced user and understand how to undo them. You will no longer have any files on your desktop.

  4. Hi there

    For some odd reason, all I get is a shortcut on my desktop that says “Desktop” and points to the new dropbox folder. I’m guessing that’s not what you meant. Has this changed in a later version of Mac OS?

Leave a Comment

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

Posted in