Reputation: 5230
I need to get the file path of the chosen folder from AppleScript. I am using the following code to do this.
--Display selection window
set source_folder to choose folder with prompt "Please select directory."
--Get the path of the folder
set item_list to get the path of every disk item of source_folder
I am getting a file path like this:
File:Path:To:the:fodler
What I want is:
File/Path/To/the/folder
Upvotes: 5
Views: 9436
Reputation: 11238
Try:
set source_folder to choose folder with prompt "Please select directory."
tell application "System Events"
set item_list to POSIX path of every disk item of source_folder
end tell
Upvotes: 5