Sync STATA programs and settings with Dropbox

December 18, 2012   

With the release of STATA 12, users are allowed to install STATA across platform (linux, mac, windows) on up to three computers/user. If you frequently install/edit programs you can sync files from the ado directory, where programs are stored, across your computers using Dropbox.

Step 1: Install Dropbox

Go to Dropbox, signup for an account and install.

Step 2: Create an ado directory

Create the following directories within your dropbox directory:

  1. dropbox/ado
  2. dropbox/ado/plus – For installed ado files.
  3. dropbox/ado/personal – For personal ado files

Step 3: Edit profile.do

profile.do is a file that runs every time you startup STATA. STATA will look in a variety of places for the file depending on your operating system. Type help profile for more information on where it is stored on your operating system.

This file needs to be created and edited on each system you want to sync. Here’s where you might store it on Mac and linux:

  • **Mac **/Users/[your username]/Library/Application Support/Stata/ado/personal/profile.do
  • Linux /bin/profile.do

Next you need to edit this file on each system to point at the appropriate dropbox directory. On Mac this might look like this:

*! profile.do
sysdir set PERSONAL "~/Dropbox/ado/personal/"
sysdir set PLUS "~/Dropbox/ado/plus/"

Restart STATA and you should see something like this:

running /Users/Dan/Library/Application Support/Stata/ado/personal/profile.do 

Dropbox does the rest – syncing across your systems. You can run an additional do file located in your dropbox folder if you want to centrally edit startup settings like setting memory or turning the ‘more’ option off.

Programming