Special file properties like 'file type'

delphi package - easy access to shell apis

Special file properties like 'file type'

Postby Logikmensch » Wed Jul 12, 2006 4:11 am

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

Postby madshi » Wed Jul 12, 2006 6:33 am

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

Postby Logikmensch » Wed Jul 12, 2006 7:55 am

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


Return to madShell

Who is online

Users browsing this forum: No registered users and 1 guest