Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In windows I right click and then there is an option to create a text file.

How to do so in mac?

share|improve this question
Great Question. I can't figure out why I need to run an application or install an application to do this. – jbchurchill Apr 7 '15 at 1:59
I have to say this is a great question.. and it always makes me wonder what the heck they were thinking when the decided to make something so simple so hard. – baash05 Apr 7 '15 at 7:17
this is one of the two biggest reasons why I think Macs are crap, the other being the single-click mouse. horrible. otherwise, miracles of engineering. – Alex Mills May 14 '15 at 23:50
@AlexMills you think Macs are crap because you can't right-click and create a blank file??? What's the point of that anyways? If you need to create a text file... open TextEdit or something. I honestly don't see the point here... ? – Charlie74 Jan 6 at 3:07
yes I do think Macs are crap because you can't right-click and create a blank file – Alex Mills Jan 6 at 8:28

11 Answers 11

up vote 31 down vote accepted

You can also do this in Terminal. Go to the directory where you want to create the file, then run the following:

touch file.txt

Or redirect 'nothing' to a text file

> file.txt
share|improve this answer
any easy way to go the directory that I want? Unlike in windows I can't even copy that directory as text – Jim Thio Mar 5 '13 at 14:57
In Terminal, you can type cd, then a space, then drag a folder onto the Terminal window and press Return to go to that folder. – Kirk McElhearn Mar 5 '13 at 15:53
In 10.8 and later you can also drag the folder on a Terminal window while holding command. Or if you copy the folder, ⌘V inserts its path in Terminal. – user495470 Mar 5 '13 at 16:40
None are convenience for users. For a text file, I have to open up a terminal type a command and drag and drop then type another command! Come on! – MIH1406 Mar 17 '15 at 5:16
You mentioned 'also'. What was the first method? – Shubham A. Apr 24 at 7:53

Check my answer at - SuperUser.

Try XtraFinder.

This app is just great, solved all my basic needs after switching from a windows platform like adding "New File" in context menu and finder toolbar, etc. Some of the features as listed on their website are -

XtraFinder add Tabs and features to Mac Finder.

• Tabs & Dual Panel.

• Arrange folders on top.

• Cut & Paste.

• Global hotkeys.

• "Copy Path", "Show Hidden Items", "Hide Desktop", "Refresh", "New File", "Copy to", "Move to", "New Terminal Here", "Make Symbolic Link", "Contents", "Attributes", … .

• Legacy label for OSX 10.9 & 10.10. Light text on dark background. Transparent window.

• Colorful icons in Sidebar.

• Size of selected items in Status Bar.

• Automatically adjust width of columns.

• Press Enter or Return to open selection.

• Display folder item count in List view.

• Middle-click to open folder in new window or new tab.

• Much more.

I use this app with OS X 10.9.5 and did not encounter any issues with it. It has native os x icon style which looks good on retina screens also. Here is a screenshot of my finder toolbar -

Finder Toolbar

Ps. this app is also free!

share|improve this answer

There's two ways to do this, the easiest is the first option;

  1. Open TextEdit and type whatever you need into it then save it to the location you want the file to live.

    You can open TextEdit quickly by invoking Spotlight and being typing Tex..., you should see the top hit is the app you want so you can just press enter to open it.

  2. This is more involved and will require you to create an AppleScript. The contents of the script needs to be:

    tell application "Finder" to make new file at (the target of the front window) as alias

Export the script as an Application somewhere safe and make sure you tick Run Only when saving it. Then drag the resulting file to the toolbar in Finder

This will then allow you to create a blank text file in what ever window you're viewing in Finder called untitled which you can then double click to edit in TextEdit

The Ultimate Beginner’s Guide To AppleScript, is good if you want to know more about AppleScript.

share|improve this answer
Thanks sgtbeano, the solution with the application is exactly what I was looking for. Please let me know how to automatically open the created file? – Martin Pfeffer Jun 2 at 22:57

Here is my workaround:

  1. Do this once, create an empty text file in your desktop to serve as template.

  2. Opt/Alt-drag this file to the folder to make a copy.

share|improve this answer
this means being smart without being oversmart - awesome – Marco Piccolino Jul 15 at 14:06

Here's my script for creating new files from a store of templates.

I run it with FastScripts using a keyboard shortcut, but you can save it to an applet and put it in the menu bar, create an automator action, etc.


--       Author: Christopher Stone 
--      Created: 2012-10-26 : 01:27
--     Modified: 2012-10-26 : 18:26
--  Application: Finder
--      Purpose: Create a new file from a file-type list in the front Finder window using
--             : template files stored in a folder.
-- Dependencies: Template files provided by the user.
--    Templates: Auto-creates a Text template - others are for the user to supply.


    set templateFolderPath to ((path to application support from user domain as text) & "Script_Support:New_File_Here!:")
    set templateFolder to alias templateFolderPath
  on error
    set newFilesHereFolder to quoted form of (POSIX path of templateFolderPath)
    set textTemplate to newFilesHereFolder & "Text_Template.txt"
    do shell script "mkdir -p " & newFilesHereFolder & ";
     touch " & textTemplate & ";
     open -R " & textTemplate
  end try

  tell application "Finder"
    if front window exists then
      set winTarget to target of front window as alias
      set fileTemplateList to name of files of templateFolder

      tell me to set fileType to choose from list fileTemplateList with title "New_File_Here! Templates" with prompt ¬
        "Pick One or More:" default items {get item 1 of fileTemplateList} with multiple selections allowed

      if fileType ≠ false then
        set AppleScript's text item delimiters to (return & templateFolderPath)
        set itemsToCopy to paragraphs of ((templateFolder as text) & fileType)

        repeat with i in itemsToCopy
          set i's contents to i as alias
        end repeat

        set copiedFiles to duplicate itemsToCopy to winTarget
        select copiedFiles
      end if

      error "No windows open in Finder!"
    end if
  end tell

on error e number n
  set e to e & return & return & "Num: " & n
  tell me to set dDlg to display dialog e with title "ERROR!" buttons {"Cancel", "Copy", "OK"} default button "OK"
  if button returned of dDlg = "Copy" then set the clipboard to e
end try

share|improve this answer
This solution is great if you're got Alfred with the powerpack so you can just use a hotkey over a finder window – David Oct 7 '15 at 21:05

I use PathFinder as a replacement for Finder and it includes this in its right-click context menu. It is prboably too expensive a solution just for this but if you want to have a better Finder for other reasons as well.

share|improve this answer

There are two useful utilities that you can download and install that will enable you to create a new text file (or RTF file) in a currently-open folder that you are viewing using the Finder.

The utilities are called NewTextFileHere and NewRTFHere and can be downloaded from

Icons for either of these apps can then be included on all of your Finder windows.

share|improve this answer
Or use "stationary Pad" in the finder, which does this, and is a built in OS function. – stuffe Dec 19 '13 at 14:58

This article from MacWorld indicates how to create a service that creates a new text file.

share|improve this answer

My method to make a text file is crude but more simple:

Simply create your text file in TextEdit save as Rich Text Format "whatever.rtf"

Then simply go to the newly created "whatever.rtf" file and edit the filename and change the ".rtf" in the file name to ".txt"

and say yes when the dialog box pops up asking to confirm change.

And your done.

If you can't see your .rtf file extension, than you need to make it visible in settings somewhere. Then it will be as easy as changing it under windows.

Easy, but annoying that you can't save as a text file in the first place.

P.S. Once you have changed it to a .txt file. You can then edit it with a text editor like TextEdit and save it and it will still be a .txt file.

share|improve this answer

If you have the Finder window open, use Spotlight to open TextEdit. When you're ready to save the file, drag the text file icon from the title bar of TextEdit into the Finder window where you want to save it.

share|improve this answer

How to make as Service (El Capitan 10.11.5)

Automator > New Document > Service > Service receives no input in > From Utilities drag action Run AppleScript > Add following script > File/Save.../Save service as: New Text File

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

Go to any folder > Finder/Services/New Text File

Notice! You get an error if you try to add another untitled.txt to the same folder.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.