Support
Joined: 18 Jul 2005 Posts: 731
|
Posted: Tue Apr 21, 2009 4:14 am Post subject: HOWTO: Always show extensions for files irrespective of the OS setting |
|
|
FileView follows the "Hide File Extensions for Known File Types" setting in Windows Explorer - if it is ON, FileView hides the extension of a file (for example, 'notes.txt' is displayed as simply 'notes').
To force FileView to always show the extension irrespective of the OS setting, use the following code in the AfterItemAdd event:
Code: | // Only show extensions for non-folders belonging to the file-system
ItemAttributes attr = e.Item.GetAttributes(ItemAttributes.FileSys| ItemAttributes.Folder);
if((attr & ItemAttributes.FileSys)!=0 && (attr & ItemAttributes.Folder)==0)
{
e.Item.Text = e.Item.GetDisplayNameEx(DisplayNameFlags.ForParsing| DisplayNameFlags.InFolder);
} |
|
|