{"id":2603,"date":"2016-04-03T15:25:03","date_gmt":"2016-04-03T09:55:03","guid":{"rendered":"http:\/\/198.58.113.91\/blog\/?p=2603"},"modified":"2020-12-07T05:13:04","modified_gmt":"2020-12-07T05:13:04","slug":"double-extensions-files-save-as-dialog-programs-avoid","status":"publish","type":"post","link":"https:\/\/www.winhelponline.com\/blog\/double-extensions-files-save-as-dialog-programs-avoid\/","title":{"rendered":"[Fix] Save As dialog adds double extensions when saving files"},"content":{"rendered":"<p>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 <code>.php<\/code> file, and save it, the file may be saved as <code>filename<b>.php.txt<\/b><\/code>.<!--more--><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/w10\/double-ext-2.png\" width=\"333\" height=\"364\" \/><\/p>\n<p>Which results in this:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/w10\/double-ext-1.png\" width=\"264\" height=\"92\" \/><br \/>\n<!--more--><\/p>\n<h2>Solution: Save As dialog adds double extensions when saving files<\/h2>\n<p>To prevent the Save As dialog from adding double extensions to a file, there are three methods:<\/p>\n<h3>Option 1<\/h3>\n<p>In the Save as dialog, type the file name and select &#8220;All files&#8221; in the &#8220;Save as type:&#8221; drop-down before clicking save. However, not all programs will show the &#8220;All files&#8221; option in the Save as dialog.<\/p>\n<h3>Option 2<\/h3>\n<p>In the Save as dialog, enclose the file name within double quotes, such as <code>\"signup.php\"<\/code> instead of <code>signup.php<\/code><\/p>\n<h3>Option\u00a03<\/h3>\n<p>It&#8217;s been noted that Windows adds double extensions only if the file type is not registered. For example, <code>.php<\/code> file extension isn&#8217;t registered or associated by default, and Windows adds double extension in this case.<\/p>\n<p>Use one of these methods to add <code>.php<\/code> to the list of registered file extensions. You don&#8217;t have to associate it with a program compulsorily &#8212; adding the extension in the registry should suffice. The following command is for <b>.php<\/b> file type:<\/p>\n<p>Open a Command Prompt window, and type:<\/p>\n<pre>reg add hkcu\\software\\classes\\.php<\/pre>\n<p>Press <kbd>Enter<\/kbd>.<\/p>\n<p>To apply the setting for all users in the system, open an <a href=\"https:\/\/www.winhelponline.com\/blog\/how-to-open-an-elevated-command-prompt-windows-vista\/\">admin Command Prompt<\/a>, and type this command:<\/p>\n<pre>reg add hkcr\\.php<\/pre>\n<p>Press <kbd>Enter<\/kbd>.<\/p>\n<p><b>Alternatively, you can use the Registry Editor to add the file extension.<\/b><\/p>\n<ol>\n<li>Launch <code>regedit.exe<\/code><\/li>\n<li>Select the <code>HKEY_CLASSES_ROOT<\/code> key.<\/li>\n<li>From the Edit menu, click New, click Key.<\/li>\n<li>Name the key accordingly (e.g., <code>.php<\/code> &#8212; with the leading dot.)<\/li>\n<li>Exit the Registry Editor.<\/li>\n<\/ol>\n<p>Windows will now know that <code>.php<\/code> is a registered file type, and the Save As dialogs should no longer add double extensions when creating\/saving as a <code>.php<\/code> file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 filename.php.txt.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[441],"class_list":["post-2603","post","type-post","status-publish","format-standard","hentry","category-microsoft","tag-registry"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":1113,"url":"https:\/\/www.winhelponline.com\/blog\/exe-files-open-notepad-fix-association\/","url_meta":{"origin":2603,"position":0},"title":"[Fix] .EXE Files Open in Notepad or Other App when Double-clicked","author":"Ramesh","date":"March 9, 2007","format":false,"excerpt":"Summary: Double-clicking an .exe file may open Notepad or any other application, displaying junk characters. On some systems, the Open with dialog may appear when double-clicking .exe files. This article explains how to fix the .exe file association in Windows 10 and 11. Did you accidentally use the Default Programs\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"exe files open in notepad","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2007\/03\/exe_open_notepad.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2007\/03\/exe_open_notepad.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2007\/03\/exe_open_notepad.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":856,"url":"https:\/\/www.winhelponline.com\/blog\/change-default-icon-file-type-windows\/","url_meta":{"origin":2603,"position":1},"title":"How to Change the Icon for a File Type in Windows","author":"Ramesh","date":"February 11, 2009","format":false,"excerpt":"Surprisingly, Windows doesn't have a built-in option to allow users to set custom icons for file types. If you have a custom file type and the corresponding program doesn't have a nice-looking icon in its .exe or .dll resource, you can manually change or customize the default icon for that\u2026","rel":"","context":"In &quot;Utilities&quot;","block_context":{"text":"Utilities","link":"https:\/\/www.winhelponline.com\/blog\/category\/utilities\/"},"img":{"alt_text":"How to Change the Icon for a File Type in Windows","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2009\/02\/filetypesman-file-type-icon-1.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2009\/02\/filetypesman-file-type-icon-1.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2009\/02\/filetypesman-file-type-icon-1.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2009\/02\/filetypesman-file-type-icon-1.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":2941,"url":"https:\/\/www.winhelponline.com\/blog\/save-as-dialog-empty-grayed-out\/","url_meta":{"origin":2603,"position":2},"title":"Save As Dialog Empty or Grayed Out in Various Programs","author":"Ramesh","date":"April 15, 2016","format":false,"excerpt":"When you attempt to open or save a file from various applications that use Windows File Open or Save As dialog, the dialog boxes may appear blank or with a grey background, without the folder view or navigation pane. Here is what it might look like. On some systems, the\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/w10\/commondialog-fix.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/w10\/commondialog-fix.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/w10\/commondialog-fix.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":26942,"url":"https:\/\/www.winhelponline.com\/blog\/internet-shortcuts-open-print-dialog-web-doc-tab-missing\/","url_meta":{"origin":2603,"position":3},"title":"Internet Shortcuts Open Print Dialog; Web Document Tab Missing","author":"Ramesh","date":"July 26, 2022","format":false,"excerpt":"When you right-click an internet shortcut (.URL file), the \"Print\" command is the default (shown in bold letters) action. As a result, double-clicking on internet shortcuts will open the Print dialog. And, the Web document tab may be missing in the property sheet for Internet Shortcut (.URL) files. Additionally, the\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"web document tab missing url properties","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2022\/07\/webdoctab-1.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":273,"url":"https:\/\/www.winhelponline.com\/blog\/add-the-open-file-location-context-menu-for-shortcuts-in-windows-xp\/","url_meta":{"origin":2603,"position":4},"title":"How to Add &#8220;Open File Location&#8221; Right-Click Option in Windows XP","author":"Ramesh","date":"May 9, 2008","format":false,"excerpt":"Windows Vista and Windows 7 include the Open file location context menu item for Shortcuts, which helps you quickly open the target folder of a shortcut. In Windows XP, it takes four mouse clicks to accomplish the task. To open the target folder of a shortcut in Windows XP, you\u2026","rel":"","context":"In &quot;Windows XP&quot;","block_context":{"text":"Windows XP","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/windows-xp\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/opentargetdir.gif?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":4939,"url":"https:\/\/www.winhelponline.com\/blog\/extract-missing-zip-files-right-click-menu-fix\/","url_meta":{"origin":2603,"position":5},"title":"Restore Missing &#8220;Extract All&#8221; Option to Zip Right-Click Menu","author":"Ramesh","date":"December 24, 2016","format":false,"excerpt":"When you right-click on a .zip file (Compressed Folder) and click \"Extract All\", it extracts the contents of the .zip file to a folder, and automatically opens the folder. Extract All option may be missing because of incorrect .zip file association setting, especially after installing and uninstalling a 3rd party\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"restore extract all to the right-click menu for .zip files","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/12\/w10-zip-selection-asso.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/12\/w10-zip-selection-asso.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/12\/w10-zip-selection-asso.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/2603","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/comments?post=2603"}],"version-history":[{"count":0,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/2603\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/media?parent=2603"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/categories?post=2603"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/tags?post=2603"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}