When I find myself repeating tasks and actions on my computer, I always feel the urge to automate them. Time is precious, people! Luckily, someone already solved this particular Dropbox problem and was kind enough to share it. This script automatically copies to the clipboard the URL for any file you put in your Dropbox Public folder. That way, you can immediately copy and paste that link in an email, IM, blog post, etc., without having to go to your Public folder, find the file in question, right-click on it, select “Dropbox”, then “Copy Public Link”.
If you scroll to the bottom of the linked page, you’ll find a variation of the script, optimized for Growl. I just tried it and it works. Just make sure to replace the number in the Dropbox URL on line 15 with the one corresponding to your account.
I also wanted to provide updated instructions for configuring the file. These steps should work on Snow Leopard. Let me know if you find otherwise.
- If you want the Growl-optimized version, download it here
- Launch AppleScript and open the script file you just downloaded
- In line 15, replace “EDIT_THIS_NUMBER” with your Dropbox account number*
- Save the script as “CopyDropboxURL.scpt”
- Put it in this folder: Macintosh HD/Library/Scripts/Folder Action Scripts
- Right-click on your Public Dropbox folder and select “Folder Actions Setup…” (this might be under the Services menu)
- The “Folder Actions Setup” application should open and should immediately allow you to “Choose a Script to Attach”
- Click on “CopyDropboxURL.scpt”
- Click the checkbox to “Enable Folder Actions”
*The number that shows up in the URL of your public links when you select “Copy Public Link.” So, if the URL to a file called “monfresh.jpg” looks like this: http://dl.getdropbox.com/u/123456/monfresh.jpg, then you should replace “EDIT_THIS_NUMBER” with “123456”.
UPDATE: Reader Will Burns asked me how to make the script work for a folder within the Public folder. Here’s the solution:
- Repeat steps 6 through 9 for the folder you will dropping files in
- Add the name of the folder to the Dropbox URL in line 15. For example: http://dl.getdropbox.com/u/123456/[name_of_folder_inside_Public_folder]/
- Change this line in the script from:
set theFileName to (text item 6 of theRawFilename) as text
set theFileName to (text item 7 of theRawFilename) as text