Here are answers to some common questions about file names and file name extensions.
A file name extension is a set of characters that helps Windows understand what kind of information is in a file and what program should open it. It is called an extension because it appears at the end of the file name, following a period. In the file name myfile.txt, the extension is txt. It tells Windows that this is a text file that can be opened by programs associated with that extension, such as WordPad or Notepad.
Every program that's installed on your computer is designed to open one or more particular file types, each of which is identified by a file name extension. If you have more than one program on your computer capable of opening a file type, then one program is set as the default. To change the program that automatically opens when you double-click a file, see Change the program that opens a type of file.
It depends on the length of the complete path to the file (such as C:\Program Files\filename.txt). Windows limits a single path to 260 characters. This is why you might occasionally get an error when copying a file with a very long file name to a location that has a longer path than the file's original location.
You can't use any of the following characters in a file name: \ / ? : * " > < |
Windows hides file name extensions to make file names easier to read, but you can choose to make extensions visible. To learn how, see Show or hide file name extensions.
Usually, file name extensions should not be changed because you might not be able to open or edit the file after doing so. Sometimes, however, changing the file name extension can be useful—such as when you need to change a text file (.txt) to an HTML file (.htm) so that you can view it in a web browser.
Make sure that file name extensions are visible. To learn how to do this, see Show or hide file name extensions.
Right-click the file you want to change, and then click Rename.
Delete the file name extension, type the new extension, and then press Enter.
Windows will warn you that changing the file name extension might cause the file to stop working properly. If you are certain that the extension you typed will work with the program you're using, click Yes to confirm the change.