MacOS

How to Quickly Add a ‘New Text File’ Button to Finder Toolbar on macOS

How to Quickly Add a ‘New Text File’ Button to Finder Toolbar on macOS

If you’re using macOS and often find yourself creating new text files manually, here’s a quick tip to add a convenient button directly to the Finder toolbar.

Step 1: Create the “New Text File” Action with Automator

  1. Open the Automator app (built-in on your Mac).
  2. Choose File → New, select Application, and then click Choose.
  3. In the search bar on the left side, type Run AppleScript.
  4. Drag the Run AppleScript action into the main workspace.
  5. Replace the default AppleScript content with this:
tell application "Finder"
	set currentFolder to (folder of the front window) as alias
	set newFile to make new file at currentFolder with properties {name:"untitled.txt"}
	select newFile
end tell

This script creates a new file named untitled.txt in your currently opened Finder folder.

  1. Save your Automator action by selecting File → Save. Give it a clear name such as TXT.app and save it to your Applications folder.

Step 2: Add the Shortcut Button to Finder’s Toolbar

  1. Open Finder and navigate to your Applications folder.
  2. Hold the Command (⌘) key and drag your newly created TXT.app onto the Finder toolbar at the top.
  3. You will see your custom button appear on the Finder toolbar immediately.

Optional: Shorten Button Name for a Cleaner Toolbar

If the button name seems too long or takes up unnecessary space, you can easily rename it:

  • Locate your TXT.app in the Applications folder.
  • Right-click (or select and press Enter) and rename it to something shorter, like TXT or New.
  • Drag the renamed app onto the toolbar again (remember to hold ⌘).
  • Remove any previous versions by holding ⌘ and dragging them off the toolbar.

Usage

Whenever you want to quickly create a new text file, just click the newly added toolbar button. A fresh file named untitled.txt will instantly appear in the current Finder directory.

Enjoy your more productive macOS experience!

Suggested Articles

Leave a Reply

Your email address will not be published. Required fields are marked *