Skip to content

Instantly share code, notes, and snippets.

@hankpillow
Created November 16, 2010 18:42
Show Gist options
  • Save hankpillow/702250 to your computer and use it in GitHub Desktop.
Save hankpillow/702250 to your computer and use it in GitHub Desktop.
copies to the clipboard the full path of selected files.
on run
tell application "Finder"
set file_list to the selection as list
if length of file_list > 0 then
set full_list to ""
repeat with x in file_list
if length of full_list = 0 then
set full_list to (POSIX path of file (x as text))
else
set full_list to full_list & return & (POSIX path of file (x as text))
end if
end repeat
set the clipboard to full_list
else
display dialog "nothing selected" buttons {"ok"}
end if
end tell
end run
@hankpillow
Copy link
Author

now working with a list of files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment