Created
November 16, 2010 18:42
-
-
Save hankpillow/702250 to your computer and use it in GitHub Desktop.
copies to the clipboard the full path of selected files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Pretty useful.
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
I think this isn't the best way of creating droplets, but it has just worked for me (mac os 10.5)
1 - save this code at ~/Library/Scripts/Droplet/getpath.scpt (create the folder structure if you haven't)
2 - open the getpath.scpt with "Script Editor" and save as "Application" and set the "Run Only" option
3 - drag the getpath.path to the finder "header"
4 - just command+v to and you'll see the full path of the selected file.