[Mac only] Dropbox cloud storage allows you to sync and share files and folders between many devices, as long as the files you want to share are kept in your Dropbox folder. But how do you share and sync files that are outside of your Dropbox folder?
In this quick guide, we will be using Terminal on your Mac to let you sync any files to your Dropbox automatically without having to keep these files in your Dropbox folder, and even sync them automatically with specific folder on another computer if need be.
Recommended Reading: Automate Your Dropbox Files With Actions
Sync any folder on Mac
Before you can continue, you will need a Dropbox account. Make sure you download the app to your Mac after your account is created.
To sync any files on your Mac to Dropbox cloud storage without transferring or duplicating a file to your Dropbox folder, follow these simple steps;
Open your Terminal window, type "ln -s", hit space and leave it, do not enter.
Open your Finder and locate the folder you want to sync with Dropbox.
Drag and drop the folder to your Terminal window, and the path should appear after the line ln -s. Again, don’t hit enter and leave it.
Open your Finder again, locate the Dropbox folder and drag it to your Terminal window. Now you have the path to your Dropbox folder in your Terminal.
The final line that will appear on your Terminal should be "ln -s <path to folder> <path to dropbox>"
Now, hit Enter
After you hit enter, nothing happens, but the next time you save a new file in your selected folder, it will be sync’ed with Dropbox. Open your Dropbox folder to see the shortcut to that folder that has been created.
In this example, I sync’ed my Desktop folder, so whenever I take a screenshot, it will automatically sync with Dropbox.
Sync any folder between two Macs
If you own more than one Mac and you want to make sure every Mac has the same settings or the same files in it to save time, you can use this method.
Make sure you have done the previous steps on your first Mac.
From your second Mac, open your Terminal and type the line "ln -s". Hit space and leave it. Do not hit enter.
Drag and drop the folder you have already sync’ed with Dropbox in the previous steps, to your Terminal. The path will now appear on Terminal. Do not hit enter.
Now leave your Terminal, open Finder and locate the folder you want to sync with your second Mac, and delete it. Make sure you make a backup first though, just in case. For example on the first Mac, I sync my ‘Desktop’ folder, which now I can access from my second Mac via Dropbox, so I will delete the original Desktop folder on my second Mac.
- After deleting it, drag and drop the parent directory of the deleted folder to your Terminal.
Your Terminal should have "ln -s <folder path from Dropbox> <path to parent directory of deleted folder>"
Now whenever you save a file from your first Mac, you will see it on your second Mac as long they both are connected to Dropbox. In this example, when I take a screenshot on my first Mac, it will automatically appear on the second Mac without me having to transfer or duplicate files to and from my Dropbox folder.