Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.6: Create a Service to copy a file path URL to the clipboard' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.6: Create a Service to copy a file path URL to the clipboard
Authored by: mr. applescript on Dec 04, '09 12:06:59PM
Guys, the Finder scripting dictionary has a URL property of every disk item. Here's what the script would look like to get the url of passed items:
set these_URLs to ""
tell application "Finder"
	repeat with i from 1 to the count of input
		if i is 1 then
			set these_URLs to the URL of item i of input
		else
			set these_URLs to these_URLs & return &  the URL of item i of input
		end if
	end repeat
end tell
Edited on Dec 04, '09 12:14:23PM by mr. applescript


[ Reply to This | # ]
10.6: Create a Service to copy a file path URL to the clipboard
Authored by: ewelch on Dec 04, '09 08:21:08PM

The Applscript stopped with an error for me.

---
Eric

Ernest Hemingway's writing reminds me of the farting of an old horse. - E.B. White



[ Reply to This | # ]
10.6: Create a Service to copy a file path URL to the clipboard
Authored by: trosberg on Dec 05, '09 06:29:27AM
The script above needs some file reference(s) as input, for example
set input to selection
Works with international characters in file names.

[ Reply to This | # ]