How to quickly create new blank text files on Windows, Mac and Linux
Text file is useful for everything. Recording a note, storing information, and journaling are just a few of the many things you can do with text files.
Today, we will show you how to create new blank text files in Windows, Mac and Linux quickly. In Windows, creating new text files is easy. But on Mac and Linux, this job requires some initial setup, then creating a new text file is also quick and easy.
Create a new text file in Windows
Microsoft provides a way to create a new blank text file using the right-click menu in File Explorer .
Open File Explorer and navigate to the folder where you want to create the text file. Right-click on the folder and go to New> Text Document .
The text file is named by default as New Text Document.txt but the filename is highlighted, enter a new name for the file and press Enter or just press Enter to accept the default name.
Create new text file on Mac
There is no built-in option for New> Text Document like Windows on Mac. But users can create one-click options in Finder using the built-in Automator application.
Another option is to use a simple command in the Terminal window.
Use the Automator application to create new blank documents in any folder on your Mac
Automator is a very useful automation tool available in macOS. In addition to the basics of using Automator, today, in this article, we will look at how to use Automator to add the option to create new text files in the Finder.
Launch Automator from the Applications folder. On the dialog box displayed, select the location for the application you will create. You can save it in the Applications folder. But if you don't want to store there, you can choose another location. Just make sure it's a fixed position.
When you are in the selected location, click New Document.
.
Automator will ask what type of document you want to create. Click Application in the Choose a type box for your document . Then, click Choose .
Select Actions at the top of the left pane and Library in the control panel. Scroll down the list of actions and drag Run AppleScript action into the task pane
.
Delete the current text in the AppleScript Run box. Copy the following line and paste it into the AppleScript Run box.
tell application "Finder" to make new file (của đích của cửa sổ đầu) như alias
Then, go to File> Save .
Enter a name for the application in the Save As box, keep the extension ' .app '.
Select Application in File Format . This will be the default option. Then, click Save .
Now that we have created the Automator application, we will then add it to the toolbar in the Finder.
Open Finder and navigate to the folder where you saved the Automator application.
Hold down Option + Cmd and drag the application file to the toolbar.
To use the new application to create a blank text file, go to the folder where you want to store the file and click the Automator button in the toolbar.
A text file named ' untitled ' will be created in the directory.
Method to create a blank text file without setting the ".txt" file extension. If you plan to transfer the file to a Windows machine, you should add the ".txt" file extension to the file. It will be more difficult to work with files that do not have extensions in Windows.
To add the file extension '.txt' and change the file name if you want, right-click the text file. Then, select Rename and enter a new name for the file, remember to enter: .txt at the end of the file name.
Click Add when the following dialog box is displayed.
Double-click the new text file to open it in your default text editor, add content and save it.
Use Terminal to create a new blank document in any folder on your Mac
You can also use Terminal to create a new blank text file. The easiest way is to open the Finder and select the folder where you want to save the text file. Go to Finder> Services> New Terminal at Folder .
A Terminal window opens for the selected folder. Type the following command at the prompt, replace " MyTextFile.txt " with the name you want to use for your text file.
touch MyTextFile.txt
The file is created and saved in the folder you selected. You can double-click the file to open it in the default text editor, add content and save it.
Create new text file on Linux
In Linux, you can use the Command line to create a new blank text file, just like you do on a Mac. If you prefer to use Nautilus to process files, you can quickly create text files there.
Use the command line to create a new blank text document in Linux
To use the command line to create a new blank text file, press Ctrl + Alt + T to open the Terminal window. Enter the following command and press Enter .
touch ~ / Documents / TextFiles / MyTextFile.txt
Change the path and file name ( ~ / Documents / TextFiles / MyTextFile.txt ) to the new name you want to use. The tilde character (~) is a shortcut to your home directory. For example, the full path to the text file above is /home/lori/Documents/TextFiles/MyTextFile.txt.
This method works in any Linux distribution, but the shortcut to open a Terminal window may vary.
- Create your own Linux distribution with Ubuntu Imager
Add a blank document to Nautilus in Ubuntu Linux
We will show you how to add an option for Nautilus in Ubuntu to create a new text file. File manager in other Linux distributions, such as Linux Mint, Fedora, Red Hat, etc., may have this type of option. If not, you can use the command line method mentioned above.
Before Ubuntu 17.10, Nautilus contained an option on the right-click menu that allows you to create a new blank document in the current directory. But that option was removed in versions 17.10 and 18.04. We will show you how to add this option to Nautilus.
In the Home folder, you will see a folder named Templates . At first, it was completely empty. Adding files to this folder allows you to quickly create new files using the right-click menu in Nautilus.
You can use the touch command touch command that we mentioned in the previous section to create a new blank document file.
Press Ctrl + Alt + T to open the Terminal window. Then, type the following command and press Enter .
touch ~ / Templates / Empty Document
Note the backslash and the space between 'Empty' and 'Document'. If there is a space in the path or file name, you must put a backslash before it.
A new file named " Empty Document " is added to the Templates folder. You can use a different name for the template file but save it in the Templates folder.
If you don't like using the command line, you can create a blank document template with gedit. Press the Windows key and type: gedit in the search box. Then, click the displayed Text Editor icon .
Click Save without entering any text in the file.
Go to the Templates folder in Home .
Enter a name, such as ' Empty Document ', in the Name box and click Save .
Use the new blank document template to create a new text file in Linux
Once you've created a blank document template by following the steps in the previous section, you can now create a new text file in Nautilus.
Right-click on any folder and go to New Document> Empty Document . The Empty Document option displays whatever name you have set, so the options may vary depending on the user.
Save time when creating text files
Of course, you can always use the text editor to create a new text file. But the methods we've shown here are handy if you create multiple text files at the same time.
See more:
- 5 ways to create simple and common presentation files
- How to create a new host file on Windows
- Instructions on how to create PDF signature in Google Docs
You should read it
- How to Create and Edit Text File in Linux by Using Terminal
- How to Create a File in Unix
- How to create an EXE installation file
- How to Convert Text to PDF
- How to lock the Text box in Word
- How to Create and Edit Text Files Using Terminal on Linux
- Instructions for creating and using BAT file on Windows
- Instructions for creating a PDF file from multiple image files on Windows
- How to create an ISO file on Linux
- What is an XML file and how to open it?
- Text file format
- How to create Text Box in Excel
Maybe you are interested
9 ways to fix the error of not being able to save files as JPEG or PNG in Photoshop
Download standard and beautiful Word file experience initiative cover template
How to use the file search command on Windows, find saved files
How to split sheet into multiple separate Excel files
How to merge PDF files, merge and join multiple PDF files into a single file
How to clean up iPhone junk, delete junk files to free up iPhone storage