views:

4126

answers:

9

I would like to write all meta data (including advanced summary properties) for my files in a windows folder to a csv file. Is there a way to collect all the attributes? I see mp3 files have a different set of attributes compared to jpg files. (c#)

This can also be a script (vb, perl)

Update: by looking at libextractor (thank you) I can see this can be achieved by writing different plugins for different type of files. I gather this meta data is not a simple collection...

A: 

Can you be more specific? Are you wanting this captured in a text file? Can this be a script?

CodeRot
A: 

Offtopic: He tagged c# and .Net... It's low info but enough for answer

GHad
I am not sure how do you mean
Notitze
+1  A: 

In a library? Try libextractor if your software is GPL.

TobiX
can this be used from perl?
Notitze
It seems there is a CPAN module: http://search.cpan.org/~flora/File-Extractor/
TobiX
A: 

I think it's the etc. part that would need clarification. If the OP expects someone to give a specific solution then specific requirements would be necessary.

EBGreen
+2  A: 

If you can cope w/ VB.Net: http://www.codeproject.com/KB/vb/mp3id3v1.aspx

If you can cope w/ C++/.Net: http://www.codeproject.com/KB/audio-video/mp3fileinfo.aspx

For either (assuming the C++) is compiled to .Net, you can use Reflector to disassemble the binary and convert it to C#. Check w/ the respective authors about their licenses first (usually Code Project articles are under an open license like CPOL).

torial
+1  A: 

Ok, after the clarification edits, I would suggest looking at the introspection available in .Net. I will warn you however that I think you will get more satisfying results if you forgo introspection and define the specific properties that you want for the file types that you expect to see.

Since scripting is valid, then if this were my problem to solve I would use Powershell since the .net introspection is baked in.

EBGreen
+4  A: 

In Perl, you can use MP3::Tag or MP3::Info

Leon Timmermans
A: 

Nice post on the libextractor pointer above: http://gavinjnet.blogspot.com/2007/07/file-magic-and-libextract-on-windows.html

Notitze
A: 

It may not be worth it to add all of the data from a jpeg file (exif data). I would hand pick what attributes I wanted from those files.

Brad Gilbert