Nurkholis Madjid

Dropbox Selective Sync

Dropbox (referral link) has a feature to save some space on your machine called 'selective sync'. Basically, you can exclude any folder (or file) on your Dropbox so that the folder is not synced to your machine. This is very handy if you have limited space on your hard drive.


On Mac, you can do it with opening the Dropbox preference setting, and choose the Account tab:

Dropbox account preference setting.Dropbox account preference setting.

And then click the Change Settings... button next to Selective Sync::

Dropbox selective sync.Dropbox selective sync.

You can deselect any folder from that list so that they won’t be synced to your Mac. The folder will be disappeared from your Mac’s Dropbox folder but it’s not deleted. You can still access it via Dropbox website, or just reselect them from the Selective Sync preference so it will reappear again on your Mac.


On Linux, we can use command line for this purpose. First, download this Python script provided by Dropbox1. Then run the script:

/path/to/ exclude add ~/Dropbox/path/to/folder/

After that, the folder specified above will be excluded from syncing and will disappear from the Dropbox folder. One thing, if the folder name you want to exclude contains spaces, you should add a backslash \ character before every space in the command line. For example, if you want to exclude a folder named “folder with space” (in ~/Dropbox/path/to), then you should run the script like this:

/path/to/ exclude add ~/Dropbox/path/to/folder\ with\ spaces/

  1. This script can actually be used for anything Dropbox related, not only for selective sync

More posts on the archive.

Any comments, I'm @_nmadjid on Twitter and Instagram.