Skip to content

Instantly share code, notes, and snippets.

@brandonpittman
Last active August 29, 2015 13:56
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 brandonpittman/9244726 to your computer and use it in GitHub Desktop.
Save brandonpittman/9244726 to your computer and use it in GitHub Desktop.
Creates a new file at location of front Finder window.
tell application "Finder"
set _question to display dialog "Please enter file name..." default answer "" with title "New File"
set _file to text returned of _question
set _target to target of front window as alias
set _path to POSIX path of _target
set full_name to quoted form of _path & _file
do shell script "touch " & full_name
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment