Last active
September 22, 2022 00:55
-
-
Save shibaku/249ecd9e44b83807f84b to your computer and use it in GitHub Desktop.
Applescript to return name, path, and path to parent folder of a given folder in Finder.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Finder" | |
set FolderPath to (choose folder) -- sets file path to folder you select | |
set ParentFolder to container of FolderPath -- sets the parent folder of the folder you select | |
set Foldername to name of folder FolderPath -- sets the folder name as text | |
display dialog FolderPath as text | |
display dialog ParentFolder as text | |
display dialog Foldername as text | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment