When you use the Save or Save As dialog in various programs and type a file name and click Save, the file name may contain double extensions. For instance, if you use your text editor to create a
.php file, and save it, the file may be saved as
Which results in this:
Solution: Save As dialog adds double extensions when saving files
To prevent the Save As dialog from adding double extensions to a file, there are three methods:
In the Save as dialog, type the file name and select “All files” in the “Save as type:” drop-down before clicking save. However, not all programs will show the “All files” option in the Save as dialog.
In the Save as dialog, enclose the file name within double quotes, such as
"signup.php" instead of
It’s been noted that Windows adds double extensions only if the file type is not registered. For example,
.php file extension isn’t registered or associated by default, and Windows adds double extension in this case.
Use one of these methods to add
.php to the list of registered file extensions. You don’t have to associate it with a program compulsorily — adding the extension in the registry should suffice. The following command is for .php file type:
Open a Command Prompt window, and type:
reg add hkcu\software\classes\.php
To apply the setting for all users in the system, open an admin Command Prompt, and type this command:
reg add hkcr\.php
Alternatively, you can use the Registry Editor to add the file extension.
- Select the
- From the Edit menu, click New, click Key.
- Name the key accordingly (e.g.,
.php— with the leading dot.)
- Exit the Registry Editor.
Windows will now know that
.php is a registered file type, and the Save As dialogs should no longer add double extensions when creating/saving as a