A Folder Action Script that copies to clipboard the public URL of any newly created file inside of a public folder in Dropbox or Google Drive
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Note: as of Oct 1, 2013, the Dropbox application comes with screenshot uploads built in. The workflow is identical, except that their copied URL links to an HTML page displaying the image, instead of the file directly, which is arguably a lot more useful.

Note: as of Nov 10, 2013 I rewrote copy-public-url functionality from applescript to Ruby, and published this on github as dropbox-screenshots. As a result, this repo will be no longer maintained.



A Folder Action Script that copies to clipboard the public URL of any newly created file inside of a specified subdirectory of Dropbox/Public, and emits a Growl notification.

The included install-copy-public-url.app configures OS X to store screenshots under Dropbox/Public/screenshots, and installs copy-public-url.scpt to automatically run on file added to that folder.

Installation via installer

Before starting, be sure to find your Dropbox user ID, as per Finding your Dropbox ID

First download (or git clone) this repository somewhere in your home directory. Then double-click on install-copy-public-url.app, and you're good to go.

Now type CMD-SHIFT-4 to take a screenshot, and you should see the following:


Installation via terminal

For the do-it-yourself types who don't trust installers, the following terminal commands will also work:

# Checkout this repo to any directory (perhaps ~/code):
git clone https://github.com/dergachev/copy-public-url.git
cd copy-public-url

# INSTALL.sh compiles copy-public-url.applescript into copy-public-url.scpt, 
# and installs it to `~/Library/Scripts/Folder\ Action\ Scripts` via symlink.
# The first argument is your Dropbox user ID; can also be specified in INSTALL-CONFIG.sh
bash INSTALL.sh 123456 # replace 123456 with YOUR_DROPBOX_ID

Now associate copy-public-url.scpt as a Folder Action to /Users/USERNAME/Dropbox/Public/screenshots, as per Installing Folder Actions


Configuring OSX Screenshot Location

The following code will tell OS X to save screeshots to /Users/USERNAME/Dropbox/Public/screenshots, instead of the default /Users/USERNAME/Desktop:

defaults write com.apple.screencapture location ~/Dropbox/Public/screenshots
killall SystemUIServer # restarts SystemUIServer to see change

For more info, see http://osxdaily.com/2011/01/26/change-the-screenshot-save-file-location-in-mac-os-x/

Finding your Dropbox ID

To find your Dropbox user ID, do the following:

Installing Folder Actions

Folder Actions are a mechanism to have OS X automatically run a compiled applescript (eg copy-public-url.scpt) whenever files are added to a given folder (perhaps /Users/USERNAME/Dropbox/Public/screenshots). To install copy-public-url.scpt as a Folder Action on Dropbox/Public/screenshots:

  • In Finder, open Dropbox/Public
  • Right click on "screenshots" (or any other folder you'd like)
  • Select "Folder Actions Setup"
  • Select copy-public-url.scpt, and click "Attach"

Contributing Back via DECOMPILE.sh

If you ever want to make modifications to copy-public-url.applescript, it's recommended that you make the changes directly to copy-public-url.scpt (via the AppleScript Editor app), test them, and and then run DECOMPILE.sh to push them back to copy-public-url.applescript source file. The Dropbox ID hardcoded into copy-public-url.scpt will be automatically removed.

Learn more

Dropbox / screenshots


OS X Screenshots: