use AppleScript version "2.3.1"
use scripting additions
use framework "Foundation"
on nameOfOriginalFileForAlias:posixPath
tell current application's class "NSURL"
-- make URL
set anNSURL to its fileURLWithPath:posixPath
-- load data from alias file
set theData to its bookmarkDataWithContentsOfURL:anNSURL |error|:(missing value)
-- get value as dictionary from data
set theResult to its resourceValuesForKeys:{current application's NSURLLocalizedNameKey} fromBookmarkData:theData
end tell
-- extract name and coerce to text
return (theResult's objectForKey:(current application's NSURLLocalizedNameKey)) as text
end nameOfOriginalFileForAlias: