Search This Blog

Thursday, June 6, 2024

How to create a new text file in a Finder window on OSX

 I copied the anwer below from this page: 

This page has some (what look to be) good alternative and instructions but some did not work for me as well as this one below: 

===============

The simplest version does not require a file or folder to be selected, and adds a keyboard shortcut of your choice.

Part 1: Create a new Quick Action (was Service)

In Automator, create a new Quick Action (previously called a Service):



From the left side, click Utilities then drag "Run Applescript" over to the right panel.

Change the two pulldown menus at the top of the right panel to read:


Replace ALL the purple script with:

tell application "Finder"
    set txt to make new file at (the target of the front window) as alias with properties {name:"empty.txt"}
    select txt
end tell

Save the Service as "New Empty Text File" (.workflow extension will be added automatically).

This service is now available under the Finder menu in the Finder.

Part 2: Create a Keyboard Shortcut

Under System Preferences › Keyboard › Shortcuts › Services, scroll down to General (it's at the end).

You will see New Empty Text File listed with "none" as the shortcut.

Click on none and type the shortcut of your choice (I used cmd alt N):



You can now type your shortcut in the Finder whenever you want to create a new, empty, text document.

Thanks to Syreeni, whose answer made this possible, and to RoG (comment below) who contributed the line that automatically selects the new file.

Labels

problems (8) windows 10 (7) Windows 7 (6) thunderbird (5) iPhone (3) Excel (2) MacOS (2) calendar (2) chrome (2) lightning (2) mac os (2) problem (2) tips (2) Apple on windows (1) Bluetooth (1) Costco (1) Disk Incentory X (1) Excel tips (1) GrandPerspective (1) MS Office (1) Mac (1) MacMini (1) Magic trackpad (1) Microsoft Compatibility Telemetry (1) N900 (1) Netgear (1) Office 2007 (1) OneNote (1) TWS (1) ThunderBrowse (1) Timezone (1) Trello on Thunderbird (1) Ventura (1) WNDR4500 (1) Web (1) WebPG (1) Window Maximize (1) Windows XP (1) adobe (1) associations (1) auto-complete (1) autocomplete (1) cell color (1) changes (1) conditional format (1) consolidation (1) create text file (1) day of the week (1) disabled (1) dish (1) dish network (1) disk (1) embedded document (1) excell (1) extension (1) file utilities (1) finger (1) fingerprint (1) firefox (1) folder consolidation (1) font (1) font size (1) forgot password (1) google sheets (1) high cpu usage (1) i7-TWS (1) iOS 10 (1) iPhone 5 (1) iPhone device (1) issue (1) itunes (1) japanese (1) java (1) keyboard (1) language (1) lock screen (1) log in problems (1) login problems (1) lower bill (1) magic mouse (1) mail (1) maximize (1) media server (1) mouse drifting (1) mouse problems (1) new file (1) new text file (1) pdf (1) picture management (1) pictures (1) pivot table (1) portege z30-a (1) reading japanese (1) recovery (1) reduce (1) reference same cell (1) rename device (1) rikai (1) search (1) security (1) snipping (1) snipping tool (1) spotlight (1) telemetry (1) text file on mac (1) time (1) todo (1) toshiba (1) treemaps (1) unique values (1) update (1) utilities (1) weekday format (1) word (1) worksheets (1)