What is $HOME/Dropbox…

… – It depends! On which plan(s) you are using.

At Home

Personal Dropbox service


At Work

Company Dropbox service


Where <Dropbox> IS “Dropbox”


Where <Dropbox> is “Dropbox ” (including a space)+(company name) , which contains space(s)) – must be considered!

Top-level of ‘Dropbox’ entry in file system
[Dropbox]/Officef ->
(from Personal)
Software, templates, graphics, … that I’ve developed over decades and that I want to have access both at home and at work.
As an example:
Corresponding reference:
/Users/goham/Dropbox (Holy Moly Limited)/Office/bin/
[Dropbox]/Research! ->
(from Personal)
Depend on business and use (this folder is very big)


[Dropbox]/<company dropbox top folder 1>

[Dropbox]/<company dropbox top folder 2>

Bash / Terminal – Config

More also in our Bash – /is/dev/sw/programming/languages/bash/ – section.


Example (version 21.1.17) shows in .bashrc, but of course can be places in other files (as shown in Bash-section)

# 2020-12-07
# :::bash
DROPBOX_PERSONAL=$(python -c "import json;f=open('$HOME/.dropbox/info.json', 'r').read();data=json.loads(f);print data.get('personal', {}).get('path', '')")
DROPBOX_WORK=$(python -c "import json;f=open('$HOME/.dropbox/info.json', 'r').read();data=json.loads(f);print data.get('business', {}).get('path', '')")

if [ "$DROPBOX_PERSONAL" != "" ] ; then
# alias dbt='set | grep DROPB '

Potential Location, Directory References


# Entry What In Finder Notes
(1h) $HOME/Dropbox Folder Yes Personal account, at home, no fuzzing with spaces, just ‘Dropbox’, easy to use
(1w) $HOME/Dropbox (Holy Moly Limited) Folder Yes Created and maintained by Dropbox app, spaces always needs some special considerations
(2w $HOME/Dropbox (Holy Moly) Symbolic link to (1w) No Not sure when came about

Dropbox (Holy Moly Limited)
lrwxr-xr-x    1 goham  staff         43 Aug  6 15:22 Dropbox (Holy Moly) -> /Users/goham/Dropbox (Holy Moly Limited)



$HOME/Dropbox – bad idea, unfortunately, as doesn’t work with company plans

Ok, will wort on a simple personal Dropbox setup/account

im2720:~$ ll $HOME | grep -i dropb
drwx------@ 30 goham staff    960 Jan 16 06:12 Dropbox/

But NOT on company plan

mpb17:~$ ls -l $HOME
drwx------@  24 goham  staff        768 Oct 21 03:51 Dropbox (Holy Moly Limited)
lrwxr-xr-x    1 goham  staff         43 Aug  6 15:22 Dropbox (Holy Moly) -> /Users/goham/Dropbox (Holy Moly Limited)

So, what to do?




mbp17:~$ cat ~/.dropbox/
Crashpad/        events/          instance1/       machine_storage/
QuitReports/     host.db          instance_db/     metrics/
dropbox.pid      info.json        logs/            unlink.db
mbp17:~ $ cat ~/.dropbox/info.json 
{"business": {"path": "/Users/goham/Dropbox (Holy Moly Limited)", "host": 59111958000, "is_team": true, "subscription_type": "Business"}}mbp17:~ $ 



Global Shell Variables for Dropbox Paths

POSTED ON 2014-08-31

I have multiple computers running Dropbox, all of which have different folder paths to where the Dropbox folder is located. I wanted to have a universal way to find and navigate to the folders regardless of what computer I was on.

In most cases, setting a variable to your Dropbox path is relatively easy. You could set your .bashrc to look something like this


But this fails in a few situations, all of which apply to me on one or more of my computers

  • Multiple Dropbox accounts on one computer (Personal and Business accounts)
  • Dropbox isn’t located in my home folder

If you’re running Dropbox version 2.8 or higher (you should be anyways), there’s a json file that tells you where your Dropbox folders are located. The json looks like this:

    "personal": {
        "path": "/Users/username/Dropbox (Personal)",
        "host": 1234
    "business": {
        "path": "/Users/username/Dropbox (Business)", 
        "host": 5678

What this means is that you can set global variables using this information in your .bashrc or .bash_profile so that you always know where your Dropbox folder is

DROPBOX_WORK=$(python -c "import json;f=open('$HOME/.dropbox/info.json', 'r').read();data=json.loads(f);print data.get('business', {}).get('path', '')")
DROPBOX_PERSONAL=$(python -c "import json;f=open('$HOME/.dropbox/info.json', 'r').read();data=json.loads(f);print data.get('personal', {}).get('path', '')")

Now all you have to do is reference your Dropbox folders with $DROPBOX_PERSONAL or $DROPBOX_WORK.

2022-06-03 MODIFICATION FOR macOS with newer Python implementation:

DROPBOX_PERSONAL=$(python3 -c “import json;f=open(‘$HOME/.dropbox/info.json’, ‘r’).read();data=json.loads(f);print( data.get(‘personal’, {}).get(‘path’, ”))“)
DROPBOX_WORK=$(python3 -c “import json;f=open(‘$HOME/.dropbox/info.json’, ‘r’).read();data=json.loads(f);print( data.get(‘business’, {}).get(‘path’, ”))“)