Skip to content

Instantly share code, notes, and snippets.

Created October 28, 2010 13:35
Show Gist options
  • Save anonymous/651354 to your computer and use it in GitHub Desktop.
Save anonymous/651354 to your computer and use it in GitHub Desktop.
Sync a File or Folder with Dropbox
on run {input, parameters}
repeat with i from 1 to (count input)
set posix_path to POSIX path of (item i of input)
if posix_path ends with "/" then set posix_path to ¬
text 1 thru -2 of posix_path
set AppleScript's text item delimiters to "/"
set filesname to quoted form of text item -1 of posix_path
do shell script "ln -s " & quoted form of posix_path ¬
& " " & "~/Dropbox/" & filesname
end repeat
return input
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment