The Cheap Geek
Jul 12 / 11:36am

Saving iPad Documents to Dropbox

Get the script for yourself after the break.
Copy the script below into your applescript editor.  This application is located in the utilities folder inside you application folder.  Remember to replace the red text below with the path to the folder where you would like the files saved.  You can also download a copy of a completed script here.

using terms from application "Mail"

on perform mail action with messages theMessages for rule theRule

tell application "Mail"

repeat with oneMessage in theMessages

set {mail attachment:theAttachments} to oneMessage

repeat with oneAttachment in mail attachments of oneMessage

save oneAttachment in ("iMac HD:Users:jordanpatterson:Dropbox:Documents:Uploads:") & (name of oneAttachment)

end repeat

end repeat

end tell

end perform mail action with messages

end using terms from

9 comments

Oct 12, 2010
yg said...
This is great! One minor question, it seems like if there already is a file with the same name on the target folder (in your case "Uploads"), the file is not saved. Is there a way to replace the old file with the new one ?
Oct 12, 2010
You can't replace or update an existing file with the method. Recently iWork was updated to work with webdav servers and this is a much better way to use dropbox and iWork. Using this method will allow you to overwrite an existing file. I have a video tutorial in progress that details how to set this up.
Nov 23, 2010
Richard said...
can you send me the script please
Aug 31, 2011
rdserv said...
can you send me the script please
Jan 06, 2012
Andrew said...
Can you please send me the script?
Jan 16, 2012
Wayne said...
works a treat, many thanks...this functional oversight has been so frustrating, but not anymore! cant understand why folks are asking for the script, if you follow the video it only takes a minute to set up ;-)
Jan 16, 2012
Andrew said...
Wayne, the script is needed to save the attachment from your email to your Dropbox. The script is the most important part. Unless there is a way to automatically save attachments that I don't know about?
Jan 16, 2012
The script is pretty easy to replicate yourself however in this video http://www.thecheapgeek.org/mailbag-ipad-iwork-icloud-dropbox-and-cutting I detail how I get files into Dropbox now. It is much easier that relying on a mail rule. 

Apr 20, 2012
Konrad Persson said...
Hi!
Great homepage!
I cant get it to work, could it be that im running "mail" in swedish so it conflict with the script? Sorry for my bad english...

Leave a comment...