Skip to content

Instantly share code, notes, and snippets.

@scriptype
Last active September 15, 2023 14:16
Show Gist options
  • Save scriptype/f5a8fdde94aa4ebbd69f3f7090ec1fd9 to your computer and use it in GitHub Desktop.
Save scriptype/f5a8fdde94aa4ebbd69f3f7090ec1fd9 to your computer and use it in GitHub Desktop.
Create a new text file in the current finder directory on mac
-- Usage:
-- Open Automator
-- Choose to create an "Application"
-- Find "AppleScript" and drag it to the right side
-- Copy the code below
-- Save the app
-- While holding option+command, drag the app icon to finder top toolbar
tell application "Finder"
set folderPath to quoted form of POSIX path of (the target of the front window as text)
do shell script "touch " & folderPath & "Untitled.txt"
end tell
@scriptype
Copy link
Author

How it works:

creating.a.new.text.file.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment