Mac Os X: How to create a new text file directly from the Finder’s windows

Written by admin

9 August 2014

One of the (few) things I miss from Windows is the possibility to create new text files directly within the Finder without having to go to the Terminal, or other gadgets.

After several attempts and researches have able to assemble a workable solution, taking inspiration from the beautiful site of cousins ​​StackOverflow, a reference point for all developers and that I thank for the help. The page’s link is this:

Let’s start:
it is about creating an AppleScript to launch directly from the Finder Toolbar.


First of all, open AppleScript from Applicazioni -> Utility -> AppleScript Editor


Now, copy the follow text in the main empty windows of AppleScript:

tell application “Finder” to make new file at (the target of the front windowas alias with properties {name:”NewFile.txt”, file type:”text”}


and save the file, for example: in the folder /Applications/Scripts


then the saving the text of the script will appear with the formatting color


now it is important to proceed with saving of the script (in the same folder for convenience) as selecting Format document “Application”. Also remember to select the “Run Only”.


At this point it remains only to drag the script file from the folder where you have saved on the toolbar of any folder in the Finder, by holding down the CMD key.


Non è proprio la soluzione desiderata ma rappresenta comunque un compromesso accettabile. L’ideale sarebbe di poter cliccare sul tasto destro del mouse nell’area vuota della cartella e avere l’opzione “Crea nuovo file di testo” nel menu contestuale. In rete ho trovato diverse soluzioni ma nessuna di queste funziona completamente. Alcune funzionano solo su versioni di OS X differenti tra loro.

Una di queste aggiunge l’opzione nel menu contestuale ma solo se si clicca su un file già presente, condizione questa che non sempre è verificata.

It’s not really the desired solution but it still represents an acceptable compromise (in my opinion). The ideal would be to be able to click on the right mouse button in the empty area of the folder and have the option “Create new text file” in the context menu. Browsing I found several solutions but none of them works completely, just like me. Some only work on versions of OS X different from each other. One of these adds the option in the context menu but only if you click on a file that already exists, but this condition is not always verified.

If I had to find some interesting solution about I will update this post or create a new one.

Stay tuned.

Divi Meetup 2019, San Francisco

Related Articles

Mac OS X: how to capture the screen (screenshot)

Mac OS X: how to capture the screen (screenshot)

The standard method to save the contents of the screen (screenshot) is by using the application named Grab, which is located in the Applications-> Utilities. The faster and more convenient way, especially for developers, is to use some keyboard shortucts. And this...

Mac OS X: How to change the default application to open file

Mac OS X: How to change the default application to open file

Sometimes it can be useful to change default application through which open a certain file type. For example, you may decide you no longer want to use Preview to open the png file but the most complete Adobe Photoshop. You can do this directly from the window of the...