Type of file problem

hi all,

this might a simple question for u all, but i m not getting any way to find the solution. Actually i want to make it out whether the file is video file, audio file or simple image file. I dnt how i can get the type of the files. plz help needed.

thanx in advance



Answer this question

Type of file problem

  • Chris Honcoop

    hye_heena wrote:

    hi all,

    this might a simple question for u all, but i m not getting any way to find the solution. Actually i want to make it out whether the file is video file, audio file or simple image file. I dnt how i can get the type of the files. plz help needed.

    thanx in advance

    you need to be a little more specific about your context ...

    do you already have a FileInfo object if so, get the Name property, and just parse for your file extension. I don't believe there are any defined enumerations representing what you're looking for, so you'll have to know what extensions to compare against.


  • malhar

    thanx for the reply.

    I asked for the solution coz i came to the function names GetContentType from the help, but its not available in .net cf. so any alternative for this or can i pinvoke it

    thanx in advance.


  • Type of file problem