Skip to content

Instantly share code, notes, and snippets.

@ClarkGoble
Last active December 11, 2015 21:59
Show Gist options
  • Save ClarkGoble/4666613 to your computer and use it in GitHub Desktop.
Save ClarkGoble/4666613 to your computer and use it in GitHub Desktop.
Puts on the clipboard the paths of all selected files in the Finder.
tell application "Finder" to set theSel to selection as alias list
set pathList to {}
repeat with anItem in theSel
set the end of pathList to quoted form of (POSIX path of (anItem as alias))
end repeat
set savedDelimiters to AppleScript's text item delimiters
set AppleScript's text item delimiters to " "
set the clipboard to pathList as string
set AppleScript's text item delimiters to savedDelimiters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment