The Computer Oracle

Get path of parent folder of script location : Applescript

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Hypnotic Puzzle3

--

Chapters
00:00 Get Path Of Parent Folder Of Script Location : Applescript
00:59 Accepted Answer Score 20
01:09 Answer 2 Score 1
01:18 Thank you

--

Full question
https://superuser.com/questions/670893/g...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#applescript

#avk47



ACCEPTED ANSWER

Score 20


Try:

set UnixPath to POSIX path of ((path to me as text) & "::")



ANSWER 2

Score 1


You should run the script from within a 'Tell Block' like:


tell application "Finder"
get path to me

set a to container of the result
return (a as alias)
-- Or just get the name of the Parent Container like;
set b to name of a
return b
end tell