How to Create Text File in Windows 11

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

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 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 and then provide the content you want. Press Ctrl + S to save the changes.

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

Right-click on the file. You can see the Open option in the context menu, which you can use to open the file. Or, you can hit the “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. Click on the Text Document.

Now, provide the new name for the file if you don’t like the suggested one. Hit 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:

You can also use other programs such as WordPad, MS Word, and Notepad++ to create a new text document. 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. That’s it. Remember that you can also use the above programs to edit and save.

Method #3

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

Open 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 the 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.

See: How to Create Multiple Folders at Once

Method #4

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

Launch PowerShell. Type in the following command and then 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 in dot(.) place and replace the filename with the actual filename you want.

Also, you can add the parameter “Value” to the command, which is for inputting the file content. And if you add it, the command will be like:

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

That’s all.

Copy link
Powered by Social Snap