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 a type of file, see Change the program that opens a type of file.
Windows usually limits file names to 260 characters. But the file name must actually be shorter than that, since the complete path (such as C:\Program Files\filename.txt) is included in this character count. This is why you might occasionally encounter an error when copying a file with a very long file name to a location that has a longer path than its current location.
You can't use any of the following characters in a file name: \ / ? : * " > < |
By default, Windows hides file name extensions to make file names easier to read, but you can choose to make extensions visible. For more information, 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. To change a file name extension, first ensure that file name extensions are visible. Then, right-click the file you want to change and 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 is one that the program you are using will understand, click Yes to confirm the change.