If you come to the Mac from the Windows world, you may be wondering how you can quickly create a text file in a folder in MacOS. In Windows, you can simply right-click and choose to create a new text file in any directory you are in, so how can you do something similar on a Mac?
It turns out that there are many ways to create a new text file in a folder on a Mac, so let’s look at a few different approaches.
Create a new text file in a folder on your Mac using Automator
Automator is a powerful application that allows you to script and automate things. In this case, we will create an automatic quick action that can be run from anywhere in the Finder to create a new text file at the current location of the folder. So, with a little tweaking, you’ll have a super handy easy access option to create a new text file, anywhere, anytime.
- Open the Automator app on your Mac and choose to create a new “Quick Actions”
- Use the search function to search for “AppleScript” and double-click or drag and drop the Run AppleScript action to the workflow on the right, then add the following AppleScript text:
- Save a Quick Action with an obvious name, such as “Create New Text File”
- Now go to Finder on Mac and go to the folder or directory where you want to create a new text file, and drag down the “Finder” menu and go to “Services” and then select “Create New Text File”
- A new blank text file will be created named ‘untitled’
tell application "Finder" to make new file at (the target of the front window) as alias
You can use this quick action anywhere in the Finder to instantly generate a new text file.
This is probably the closest Mac action to the Windows feature by right-clicking on ‘Create New Text File’.
Create a new text file in any folder on your Mac using TextEdit
The TextEdit app on a Mac is basically like WordPad in Windows and with it you can create new text documents or rich text documents wherever you want.
- Open TextEdit on Mac
- Use your new text file or go to the File menu and select New to create a new text file
- Save the TextEdit document by going to File> Save
- Select the path of the folder where you want to save the new text document
This is how saving files on a Mac generally works, so there is nothing particularly magical or special about this approach to saving a TextEdit text file to a desired folder on a Mac.
Create a new text file anywhere on your Mac using a terminal
Finally, another method you can use to create a new text file in any location is the Terminal application:
- Open the Terminal on Mac app
- Use the following command to create a new text file in the desired location:
- For example, to create a new text file on a Mac desktop, you can use the following command:
The terminal is considered a bit more advanced, but the touch command is simple and can be used to route anywhere in the file system to create a new blank text file.
How did these methods work for you? Do you have a different approach to creating new text files in specific locations on your Mac? Which method do you use? Let us know your thoughts and experiences in the comments.
Friendly communicator. Music maven. Explorer. Pop culture trailblazer. Social media practitioner.