How to Add File Extensions to Languages in Notepad
Microsoft's Notepad is a versatile text editor that can be used in a limited fashion to write code. While the program lacks the advanced features of costly language editors and compliers it can nevertheless serve as a substitute in a pinch. One drawback of using Notepad for writing code is that it is not obvious how to save in a format other than TXT. This format will not be recognized by servers and compilers. To use Notepad as a language editor, you must first learn how to save your document in the format of your choice.
Instructions
-
-
1
Open the document by clicking "File" then "Open."
-
2
Save the file to the Desktop.
-
-
3
Minimize Notepad, then right-click the file that you just saved.
-
4
Click "Properties."
-
5
Point the mouse cursor to the white box that contains the name of your document. Click within the far right side of the box, to the right of ".txt."
-
6
Click "Backspace" until the "txt" has been deleted. Enter the extension of your particular programming language, then click "OK."
-
1
Tips & Warnings
If you have a compiler installed for your programming language, the document's sesktop icon should automatically change to reflect the new extension.
To do this from within Notepad, click "File," then "Save As." Click the down arrow next to the "Save as type:" field and select "All Files" from the dropdown menu. Click within the "File name" field and type the name you want to save it in, including the extension. Click "Save."
Always work on code in a program that supports it by default when possible. These programs often contain color coding that can help you spot mistakes.