Home » How to Create New Text File (Windows 11)

How to Create New Text File (Windows 11)

Written by Thirumalraj

You can create a text file in Windows 11 in different ways. Let’s see them below.

Note: The extension of the text file is txt.

Method #1

Please right-click on the blank area of the File Explorer (except Quick access or This PC) or desktop, hover your mouse over New and select Text Document.

Now, provide the new name for the file if you don’t like the suggested one. Hit the Enter key, and that’s all. You can see the text file, which is blank, in the place you’re in right now.

Double-click it to open it, provide the content you want and press Ctrl + S to save the changes.

Remember that you can edit the file anytime, and here’s how:

Right-click on the file, and you will see the Open option in the context menu, which you can use to open the file. Alternatively, you can hit “Show more options” in the context menu and select the Edit option.

Note:

In File Explorer, you can also use these steps to create a blank text document: Go to the place where you want it. Hit the “New” in the command bar at the top and click on Text Document.

Now, provide the new name for the file if you don’t like the suggested one. Hit the Enter key, and that’s all. You can see the text file, which is blank, in the place you’re in right now.

Method #2

Open the Notepad and provide the content you want. Hit the “File” menu at the top, then Save or press Ctrl + S.

Go to the location you prefer in the popup. Type the file name in the popup’s “Filename” field. Ensure that the “Text Documents” got selected in the “Save as type” field, the default one.

Hit the Save button, and that’s all.

Note:

To create a new text document, you can also use other programs such as WordPad, MS Word, and Notepad++. But make sure you save the file in the text documents format.

For instance, here’s how to save the text file in WordPad:

Open the WordPad and provide the content. Press Ctrl + S. In the popup, go to the preferred location, provide the filename, and open the “Save as type” drop-down list. Choose “Text Document” and hit the Save button.

In the popup, click Yes, and that’s it. Remember that you can also use the above programs to edit and save.

Method #3

Using Command Prompt, you can do this task. Here’s how:

Open the Command Prompt, type in the following command, and press the Enter key on your keyboard: echo.>filename.txt

That’s all. You’ve successfully created a blank text file.

Notes: In the command, replace the filename with the actual filename you want. Also, before using the command, if you wish, change the location.

If you want to create a text file with content, then you need to use the following command: echo content > filename.txt

Replace the content with the content you want and the filename with the actual filename you want.

Method #4

Using the New-Item cmdlet, you can complete this task, and here’s how:

Launch PowerShell. Type in the following command and press the Enter key: New-Item -Path . -Name “filename.txt”

This command creates an empty text file with the name filename in the directory in which the PowerShell is right now.

If you wish, make these changes in the command: provide the path you want within double quotes on the dot (.) place and replace the filename with the actual filename you want.

Also, you can add the parameter “Value” to the command to input the file content.

If you add it, the command will look like this:

New-Item -Path . -Name “filename.txt” -Value “Hello”

That’s all.

Thanks for reading.

Search

Categories