Skip to content

Instantly share code, notes, and snippets.

@Edenharder
Forked from lg0/filename.applescript
Created January 16, 2017 17:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Edenharder/e4b91a37bbc9212c3f50797c4f1bb67c to your computer and use it in GitHub Desktop.
Save Edenharder/e4b91a37bbc9212c3f50797c4f1bb67c 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