1

Disclaimer: I don't know much AppleScript, but I am a bit of a programmer, so you can go a little technical on me.

I am looking for a solution to the issue of putting Dropbox on an external HD. While they don't advise it, I think that it can be done safely with a couple measures:

  1. Run Dropbox when the hard drive is mounted through AppleScript. This shouldn't be hard because I read that there is StartOnMount or I can listen for the hard drive's "folder" in /Volumes like here.
  2. Stop Dropbox when the hard drive is ejected, wherein lies the problem. Is there an event triggered by pushing the eject button that would allow me to run a script before un-mounting?

Either I use the above method or I somehow disable the drive from being unmounted by Mac OS X and mount and un-mount only through AppleScripts (hide it from the Finder's sidebar or, preferably, something better). Which of those is the easier solution?

  • Why applescript? – CousinCocaine Jun 22 '15 at 21:05
  • Put the Dropbox.app on the drive itself! Than it will be quit by the system:) – CousinCocaine Jun 22 '15 at 21:06
0

I use to have multiple dropbox instances running at once. I think you can put db app on the drive and use the same trick I did.

HOME=/Volumes/Whereever/you/wanna/go; /Volumes/Whereever/Dropbox.app/Contents/MacOS/Dropbox &

One thing. With this method you change your default $HOME into your new path. So Dropbox will create a folder called Dropbox in that path.

  • You can specify a custom location for the Dropbox folder. Don't have to change the HOME variable. – William T Froggard Jun 22 '15 at 21:23
  • This way the Dropbox will not default to ~/ when the drive is not there – CousinCocaine Jun 23 '15 at 12:05
  • Ah. Nice idea!. – William T Froggard Jun 23 '15 at 12:06
  • This is the HOME variable in bash, correct? Is there a way I can keep my home directory as it is now and have Dropbox on the hard drive? – David Rhoderick Jun 24 '15 at 3:47
  • Using home this way will only change home for dropbox. – CousinCocaine Jun 24 '15 at 4:54
0

CousinCocaine was correct about putting the Dropbox app on the drive itself. That prohibits the drive from being ejected without closing Dropbox, except for force ejecting, which I don't plan on doing, and just yanking the cord out, which I hope I don't do (I think that the app might close as a result of the latter). The easiest way to relocate the app is to just drag and drop it onto the drive and always run it from there.

As for specifying a custom location, this link shows you how to do it in the Dropbox interface. Not only does it now look there for the files but it actually moved everything to the new location automatically. Definitely didn't need AppleScript and I am not entirely sure why the Dropbox team don't promote this solution on their site.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .