Skip to content

Instantly share code, notes, and snippets.

@pofulu
Forked from lg0/filename.applescript
Created April 9, 2019 15:00
Show Gist options
  • Save pofulu/50f600838ed06dac798e66e391070eb8 to your computer and use it in GitHub Desktop.
Save pofulu/50f600838ed06dac798e66e391070eb8 to your computer and use it in GitHub Desktop.
applescript:get selected filename and extension
tell application "Finder" to set theFile to POSIX path of (selection as alias)
tell application "Finder" to set fileExtension to name extension of (selection as alias)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment