Page 1 of 1

Special file properties like 'file type'

PostPosted: Wed Jul 12, 2006 4:11 am
by Logikmensch
Hi,

does anybody know how to get the file type information, e.g. "Word Document" for *.doc files from a ShellObj(<path of file>) object? I studied the nice help, but did not yet found it.

Kind regards,

Claus.

PostPosted: Wed Jul 12, 2006 6:33 am
by madshi
Sorry, this is not part of madShell. You'll have to extract the extension (SysUtils.ExtractFileExt) and check the registry yourself (HKEY_CLASSES_ROOT\.doc). It's rather easy to do.

PostPosted: Wed Jul 12, 2006 7:55 am
by Logikmensch
Dear madshi,

no problem. I can extract the file type very easy using SHGetFileInfo (with the additional flag SHGFI_TYPENAME. I asked because it *could* have been already implemented in ShellObj, even if I did not see it. :D

Kind regards,

Claus.