Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to add custom metadata to file

I know that each file has metadata like title, subject, keywords and comments:

enter image description here

but what if i need custom metadata like tags for example

is it possible to do it with C#?

like image 754
Sasha Avatar asked Jul 13 '10 08:07

Sasha


3 Answers

I know that each file has metadata like title, subject, keywords and comments

That is not true. Most file types do not have a 'standard' form of metadata.

In particular, PDF files don't have properties that Windows Explorer recognizes.

Metadata (file attributes) is not a function of the filesystem.

  • Office files use a structured format that allows for such attributes.
  • Jpeg ues EXIF, a different format
like image 113
Henk Holterman Avatar answered Oct 05 '22 09:10

Henk Holterman


If using NTFS you can store whatever you like in an Alternate data stream

like image 42
Jesper Palm Avatar answered Oct 05 '22 09:10

Jesper Palm


This will depend on whether the file type you are working with supports this. For example this will not be possible with a text file.

like image 24
Darin Dimitrov Avatar answered Oct 05 '22 09:10

Darin Dimitrov