Notepad++ changes file extension when filename have dots
-
@mere-human Can you show what you have?
Because on 7.9.3 i have the same problem. -
Notepad++ v7.9.3 comes out-of-the box with Settings > Preferences > MISC > ☐ Set save dialog extension filter to *.* disabled
If you leave it disabled ☐, Save on a new file will default to Normal Text FIle and if you type
blah
as the file name, it will saveblah.txt
in your location.If you enable it ☑, Save on a new file will default to All Types, and you will have to manually type your selection or manually select the filetype before finishing the save.
-
watch this animation for the effect of this option:
-
v7.9.1 and v7.9.2 have the same option (though worded different) that works the same. That option was new to v7.9.1.
-
Users that want to use
.
in their filenames – apart from the “dot extension” part – are probably NOT going to be happy with Notepad++'s decision-making – unless they use the Set Save dialog file extension filter to *.* that Peter mentions, and type their dot-extension directly. My 2c.These type of debates (with extension handling) have literally been going on for years in the Notepad++ community. I think the judgment is that there might never be a way in Notepad++ to make all users happy. :-(
The second moment that intresting for me. Why notepad++ on rename have All Types for TXT files, bu not Normal text file option?
As far as I remember, on renaming a file the filter is and has always been set to
*.*
, regardless of any preference setting state. Notepad++ can’t read your mind – maybe you truly do want to change the file’s extension in the rename. -
No problem if i have some extension. Let i show you what happens.
If i have file with hane some.txt and choose rename
then i have extension in name even if it all types
But in my case notepad++ removes extension part from name and i need to return in each time.
Why he remove extension only in this case?
I found the reason! it depends from windows option - show file extension in explorer… Is it normal? I expected that notepad++ always shows full name with extension for “all types” and it have it’s own behaviour that not depends from windows explorer settings
-
@Понькин-Михаил said in Notepad++ changes file extension when filename have dots:
I found the reason! it depends from windows option - show file extension in explorer… Is it normal? I expected that notepad++ always shows full name with extension for “all types” and it have it’s own behaviour that not depends from windows explorer settings
The windows standard dialogs use windows rules, and follow windows explorer settings, just like in every application that uses windows standard dialogs. Notepad++ uses that windows standard dialog.
Notepad++'s tab bar will show the full filename, with extension, regardless of that setting.
-
@Понькин-Михаил said in Notepad++ changes file extension when filename have dots:
… have it’s own behaviour that not depends from windows explorer settings
The Notepad++ file dialogs are not custom-designed – they a from Windows itself. So… they are going to inherit functionality from Windows and its Explorer.
You can (probably) confirm this by trying the same test in Notepad.exe.
Or maybe I’m wrong. :-)But in my case notepad++ removes extension part from name and i need to return in each time.
I’m not sure I’m following the data here.
In the first case you have some
.
txtIn the second case you have 2021-02-15
.
Crapune
(just an approximation).In each case you have name
.
extensionJust because you don’t think of Crapune as an extension, probably Windows does.
-
@Понькин-Михаил said in Notepad++ changes file extension when filename have dots:
I found the reason! it depends from windows option - show file extension in explorer… Is it normal? I expected that notepad++ always shows full name with extension for “all types” and it have it’s own behaviour that not depends from windows explorer settings
Wow, that’s nice you found it!
I can take a look and see if there is something that can be done to the save dialog.
But it seems to me, this part is controlled by Windows and we have little impact on it. -
<Holy Hand Grenade> All users should immediately disable Microsoft’s foolish “Extensions shouldn’t mean anything but still do so let’s just hide them” feature! </Holy Hand Grenade> ;-)