Hide Extension during renaming
Hides file extensions in "Save As" dialogs and during File Explorer/Desktop renaming.
Author: AuralSX
Ever wanted to get rid of a file extension when trying to save a file on your computer or rename something on your PC while keeping the file type intact?.
This mod dynamically hides file extensions during inline file renaming in File Explorer, Desktop and "Save As" operations and restores it when you're done renaming.
Key Features
- Save As Dialogs: Automatically hides file extensions from the default filename text box when saving files.
- Inline File Renaming: Hides file extensions while editing item names on the Desktop or inside File Explorer (
SHELLDLL_DefView, SysListView32, DirectUIHWND).
- Warning Prevention: Intercepts window messages (
WM_GETTEXT) upon committing a rename to silently re-attach the original extension,
avoiding the native Windows "If you change a file name extension, the file might become unusable" warning prompt.
Things to Note:
- This mod targets native Windows File Explorer, Desktop, and standard file dialogs. It does not handle inline renaming inside third-party apps (e.g., WinRAR, 7-Zip).
- If you want to change a file's extension, you can do so inside the file's properties.
- If you type a dot at the end of a file name followed by any Windows registered extension (e.g., changing
document.txt to document.pdf), it will trigger the Windows extension change warning prompt, however non-registered extensions won't change the file type.
Known Limitations
- Folders Ending in Registered Extensions: Folders whose names explicitly end in a registered file extension (e.g., a folder named
Backup.zip or github.com) will have its trailing extension hidden during inline renaming.
- Why this happens: Windows reuses the exact same generic Win32
Edit control for both files and directories (folders). When an inline rename is triggered, the mod interacts with SetWindowTextW and receives only a window handle and a string. There is no native API or context provided by the shell at that moment to distinguish whether the text box belongs to a file or a folder. While the full folder name is safely preserved and restored upon commit, inline editing will temporarily treat the extension-like suffix as hidable.
