Special file properties like 'file type'

delphi package - easy access to shell apis
Post Reply
Logikmensch
Posts: 17
Joined: Fri Jun 30, 2006 4:26 am
Location: Germany

Special file properties like 'file type'

Post 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.
madshi
Site Admin
Posts: 10754
Joined: Sun Mar 21, 2004 5:25 pm

Post 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.
Logikmensch
Posts: 17
Joined: Fri Jun 30, 2006 4:26 am
Location: Germany

Post 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.
Post Reply