Skip to content

Instantly share code, notes, and snippets.

@dalemanthei
Created June 30, 2014 16:31
Show Gist options
  • Save dalemanthei/65acb2de4315a5940111 to your computer and use it in GitHub Desktop.
Save dalemanthei/65acb2de4315a5940111 to your computer and use it in GitHub Desktop.
A little bit of AppleScript to get a list of selected files from Path Finder.
tell application "Path Finder"
set theSelection to selection
set selection_list to theSelection as list -- list of fsItems (fsFiles and fsFolders)
set LF to character id 10
set AppleScript's text item delimiters to LF
if theSelection is not missing value then
set fileList to {}
repeat with aFile in selection_list
set end of fileList to POSIX path of aFile
end repeat
return fileList as string
end if
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment