Skip to content

Instantly share code, notes, and snippets.

@defmech
Created January 24, 2022 20:17
Show Gist options
  • Save defmech/f068ee9260e6e33eb597c19e18a97ba1 to your computer and use it in GitHub Desktop.
Save defmech/f068ee9260e6e33eb597c19e18a97ba1 to your computer and use it in GitHub Desktop.
Copies directory listing, of front Finder window, to clipboard.
tell application "Finder"
set pathList to (quoted form of POSIX path of (folder of the front window as alias))
end tell
tell application "Terminal"
do shell script "cd " & pathList & "; ls | pbcopy"
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment