ImageEn, unit iexWindowsFunctions |
|
GetWindowsFileTypeName
Declaration
function GetWindowsFileTypeName(const sFilename : String; DefToExt: Boolean = False): String;
Description
Calls ShGetFileInfo to return the Windows type for a file or folder (SHGFI_TYPENAME), e.g. 'Microsoft Word Document'
If DefToExt = False and the operation fails (e.g. for files that cannot be accesses), the result will be ''.
If DefToExt = true, it will default to "EXT File"
lblFileType.Caption := GetWindowsFileTypeName( 'D:\image.jpeg' );