473,761 Members | 3,542 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting file type

Hi,

Im creating a program in which im trying display a file list in the
listview. similar as windows explorer detailed view.
im able to get every thing except the file type.
im stuck here and could not file any example on net.

Please help

Jul 9 '07 #1
2 1499
Hi jack,

Basicly the information about the types is in the windows registry, explore
it to obtain any meta data (the framework can do it).
See more there: http://www.blackwasp.co.uk/ProgrammaticFileTypes.aspx

Kind Regards, Alex Meleta
[TechBlog] http://devkids.blogspot.com

jHi,
j>
jIm creating a program in which im trying display a file list in the
jlistview. similar as windows explorer detailed view.
jim able to get every thing except the file type.
jim stuck here and could not file any example on net.
jPlease help
j>
Jul 9 '07 #2
While the file type information is contained in the registry in some
cases, that is an implementation detail, and not always the case. Shell
extensions can easily provide different information than what is contained
in the registry.

Rather, the OP needs to call the SHGetFileInfo function through the
P/Invoke layer, passing the SHGFI_TYPENAME flag to get a string that
describes the file's type.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Alex Meleta" <am*****@gmail. comwrote in message
news:15******** *************** ***@msnews.micr osoft.com...
Hi jack,

Basicly the information about the types is in the windows registry,
explore it to obtain any meta data (the framework can do it).
See more there: http://www.blackwasp.co.uk/ProgrammaticFileTypes.aspx

Kind Regards, Alex Meleta
[TechBlog] http://devkids.blogspot.com

jHi,
jjIm creating a program in which im trying display a file list in the
jlistview. similar as windows explorer detailed view.
jim able to get every thing except the file type.
jim stuck here and could not file any example on net.
jPlease help
j>

Jul 9 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2050
by: Sriram | last post by:
Hi, I have wriiten a program to transfer a binary file. After transfer. The file contents in the destination machine is getting changed. Please Help. Please advice if i am doing any wrong. The number of bytes getting transfered
11
1981
by: Brett | last post by:
In Yahoo mail, I click the Inbox link and see my messages. If I view source, I don't have HTML which contains the URL of each message. The source HTML contains javascripting and framesets. This is different from what I am seeing. If I right click on a message link and select "copy shortcut", I can paste this link into my browser. This brings me to my message. If I view source, once again, it is javascript and framesets. How do I...
2
8873
by: Brian Henry | last post by:
I want to list out a directory listing along with showing the file type name (like explorer does when it says something like "MyDoc.DOC - Microsoft Word Document" How do I get that file type name which is Microsoft Word Document based on the extension or what ever it needs to figure out the type so i can display it in a program? also is there a simple way to get the icon of the file type? I've seen complex ways before, but is there any...
5
3803
by: mike | last post by:
Hi, I have been playing with VB.NET/C# for getting some general properties of a fileinfo object. However, FileInfo object does not seem to expose some of the basic properties like TYPE that used to be available in "FileSystemObject" of ScriptingLibrary. For example the "TYPE" property should return "Text Document" or "Microsoft Office Document" or "Visual Studio Code File" and so on. similar to the properties displayed by Properties...
1
2432
by: iwdu15 | last post by:
hi, how can i get the icon associated with a certain file type? thanks -- -iwdu15
2
3086
by: Manikandan | last post by:
Hi, I have a program written in .Net Framework 1.1 using Visual studio enterprise edition 2003. I tried compiling the same program in visual c# express edition 2005. I'm getting following errors 1.Error 6 Cannot implicitly convert type 'mscomctl.Toolbar ' to 'mscomctl.Toolbar . An explicit conversion exists (are you missing a
5
1640
by: tshad | last post by:
I have the following class in my VS 2008 project that has a namespace of MyFunctions. ********************************* Imports System Imports System.Text.RegularExpressions Namespace MyFunctions Public Class BitHandling
6
4133
by: passionateforjava | last post by:
Hi All, I am using struts application wherein I need to import file for some purpose.I have used input type="file" for the same which goes like: <input type="file" id="uploadFile" name="uploadFile" size="50"> I have the import button on which I have used onClick event to call javascript function submitValues() used to validate all the fields from the page which goes like: <input type="button" name="select" value="Import" class="CSSButton"...
9
3541
vikas251074
by: vikas251074 | last post by:
I am not getting date value in spite of my good effort. This code was working in my last office where I work. Now I am trying to work at my home pc. but not getting date value. Any can help me why this happens. This is my part of code given below. <%@ Language=VBScript%> <%Option Explicit%> <html> <head> <title>SABF</title> <!--#include file="font.css"-->
7
4442
vikas251074
by: vikas251074 | last post by:
I am getting error above in following code since few days giving tension day and night. How can I solve this? I am facing since Oct.25. in line no. 362 After doing a lot of homework, I am surrendered to you. <%@ Language=VBScript%> <%Option Explicit%>
0
9554
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9989
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9925
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8814
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7358
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6640
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5266
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3913
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.