Re: Alias Files
Re: Alias Files
- Subject: Re: Alias Files
- From: "Nigel Garvey" <email@hidden>
- Date: Fri, 1 Aug 2008 23:40:07 +0100
Luther Fuller wrote on Fri, 1 Aug 2008 10:27:31 -0500:
>There must be a work-around that would let me read the path to the
>original item from the alias file, even if the original item is not
>mounted. This information is surely within the alias file. But how do
>I read it? Perhaps a 'do shell script ... ' is in order here.
The original item appears to be an alias resource in the file. It's
probably obtainable by shell script but I don't know the way. If you have
the Satimage OSAX, there's this:
tell application "Finder"
set af to item 1 of (get selection)
if (class of af is alias file) then
set af to af as alias
-- The next two lines require the Satimage OSAX.
set rsrcNo to item 1 of (list resources "alis" from af)
set originalPath to (load resource rsrcNo type "alis" from af) as
Unicode text
end if
end tell
On my Tiger machine, the result's an HFS path if the original item's
available, or a POSIX path if its not. :?
NG
_______________________________________________
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