Last post Apr 21, 2008 12:20 PM by kumarkiran
Nov 12, 2007 08:18 PM|hurdra|LINK
I'm building a directory viewer for viewing/navigating the contents of a Web folder, much like Windows Explorer. From MSDN, I figured out how that FileInfo() and DirectoryInfo() classes have attributes like Name, Extension, and LastWriteTime that can be
retrieved and displayed easily for each folder or file in a selected directory. The last piece of info that I need to fully replicate Windows Explorer in "details" mode is "Type". Windows shows this as "File Folder" for folders, and shows descriptions like
"Microsoft Word Document", "Adobe Acrobat Document", etc. I can't find how to retrieve and display directly this with FileInfo() or DirectoryInfo(); does anyone know how to get to this info? Thanks.
Nov 15, 2007 10:34 AM|Thomas Sun – MSFT|LINK
Based on my understanding, you want to get the content type of files. If I have misunderstood you, please feel free to let me know.
The content type information is stored in the HKEY_CLASSES_ROOT node of the register. We can get the file’s extension and then get the content type of the file from register.
For more information, see
I hope this helps.
Apr 21, 2008 12:20 PM|kumarkiran|LINK
Please go through this.