Skip to content

Instantly share code, notes, and snippets.

@unforswearing
Created October 11, 2016 00:59
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unforswearing/eb266344d37fc9b862d305ac11633e8c to your computer and use it in GitHub Desktop.
Save unforswearing/eb266344d37fc9b862d305ac11633e8c to your computer and use it in GitHub Desktop.
tell application "Finder"
set FoldName to selection as text
set FoldName to POSIX path of FoldName
set newfile to text returned of (display dialog "Enter file name and extension" default answer "")
set FileName to FoldName & newfile
set FileName to POSIX path of FileName
set FileName to quoted form of FileName
do shell script "touch " & FileName
do shell script "open " & FileName
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment