Where is the meta data for files?

G

Guest

Hey there:
I have had a good deal of exposure to C# with Visual Studio 2003. I am
interested in capturing some of the meta-data associated with various files
of different types (bitrate for avi's, display size for jpegs). Essentially I
would like to access the stuff that appears when you hover a ouse over a file
in Windows Explorer. It is also on the advanced summary page when you right
click -> choose properties on a file. Especially a multi-media file.
I tried searching MSDN and google. If anyone can direct me as to where I
should look that would be great! Code snips would be even better! :)
 
J

Jani Järvinen [MVP]

Hello!
I am interested in capturing some of the meta-data associated
with various files of different types (bitrate for avi's, display size for
jpegs).

As for most multimedia files (images, video, audio) and "office" documents,
the metadata (author, proportions, fps, length, etc.) is stored as part of
the file itself. This means that you would need to read the file's header
and extract the appropriate information from the header. You would need to
have different parsers for different types of files.

You can find information about different file formats for example here:

http://www.wotsit.org/

However, some very simple files (like plain text files) can also have
describing fields that Windows Explorer displays. Because this data cannot
be stored inside the file itself, Windows uses a technique called alternate
data streams. These are supported on NTFS partitions only; Windows Explorer
won't display the Summary tab if the file resides on a FAT partition for
example.

For details about these alternate data streams, see for example MSDN:

http://support.microsoft.com/default.aspx?scid=kb;en-us;105763

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/file_streams.asp

Hope this helps.

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
(e-mail address removed)
http://www.saunalahti.fi/janij/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top