Re: path of a Finder item
Re: path of a Finder item
- Subject: Re: path of a Finder item
- From: Shane Stanley <email@hidden>
- Date: Wed, 22 Mar 2017 22:46:32 +1100
On 22 Mar 2017, at 6:58 pm, Jean-Christophe Helary <email@hidden> wrote:
Is there a more straightforward way to get the posix path of a Finder item (something I'd need to send to the Terminal as an argument):
tell application "Finder" set projet_path to POSIX path of (selection as alias) end tell
I'm fine with this, since it works, but it seems a bit convoluted.
It's not really convoluted enough, unless you're happy to have an error when there's more than one item selected. If you want just the first item -- where first might admittedly be a moving target -- you would use something like:
tell application "Finder" set projet_path to POSIX path of item 1 of (selection as alias list) end tell
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden