Last active
October 9, 2018 11:45
-
-
Save defmech/1994d487731f1b429e3cdb55bf0eeff2 to your computer and use it in GitHub Desktop.
AppleScript to copy current folder directory listing to pasteboard
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 currentDirPath to (target of front Finder window) as text | |
set folderName to name of folder currentDirPath | |
end tell | |
tell application "Terminal" | |
do shell script "cd " & (quoted form of POSIX path of currentDirPath) & "; ls | pbcopy" | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment