• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Defing a Path correctly
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Defing a Path correctly


  • Subject: Re: Defing a Path correctly
  • From: Adam Wuellner <email@hidden>
  • Date: Tue, 19 Jul 2005 17:05:21 -0500

On 7/18/05, David O'Connor <email@hidden> wrote:
> SO... anybody able to show me the error/s of my way?

Here's a script I use to get the POSIX path of the currently selected
item(s) in Finder.  It puts the path on the clipboard, so you can
paste it into whatever...

tell application "Finder"
	local s, o, f, tids
	set s to the selection
	set o to {}
	repeat with f in s
		set f to f as alias
		set end of o to POSIX path of f
	end repeat
	set {tids, AppleScript's text item delimiters} to {AppleScript's text
item delimiters, return}
	set the clipboard to (o as string)
	set AppleScript's text item delimiters to tids
end tell

(The idea, if not the code, but maybe the code, too, was lifted from
Paul Skinner on this list.)

I saved it as a script called 'Copy POSIX Paths from Finder', and run
it from the system script menu whenever I need it.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Defing a Path correctly
      • From: Martin Orpen <email@hidden>
References: 
 >Defing a Path correctly (From: "David O'Connor" <email@hidden>)

  • Prev by Date: Incrementing variables
  • Next by Date: Re: Incrementing variables
  • Previous by thread: Re: Defing a Path correctly
  • Next by thread: Re: Defing a Path correctly
  • Index(es):
    • Date
    • Thread