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
    f90b6d12-072e-4f61-a417-31f2be546021-image.png

    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 save blah.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:
    https://i.imgur.com/GxYZEjY.gif



  • 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.

    d210546a-3d20-4e25-9c41-3a8caaa81ae3-image.png



  • 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
    ee840e6f-7d6f-4be4-8e16-6d0691a7cc33-image.png
    then i have extension in name even if it all types
    e0ab3b09-690e-4521-a5db-d82f1a0cd260-image.png

    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?
    b139460c-b2cc-43e8-851c-41e2e43196cd-image.png

    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 . txt

    In the second case you have 2021-02-15 . Crapune
    (just an approximation).

    In each case you have name . extension

    Just 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> ;-)


Log in to reply