Custom meta data to windows files

2

I it possible to add custom meta data to windows files like "archive" , "read-only" etc.?

bdhar

Posted 2009-11-05T09:59:41.643

Reputation: 421

"archive"? "read-only"? are you talking about DOS file attributes? (or worse, reimplementing same?) http://www.xxcopy.com/xxcopy06.htm

– quack quixote – 2009-11-05T10:09:11.623

No. similar to those attributes, I need to implement custom attributes – bdhar – 2009-11-05T10:18:20.247

Answers

2

Short answer: No, those attributes are built into the file system. You could maybe fake your own meta-data, with a little programming.

As Hugh said, NTFS has data streams, beware though, MS claims it "may not be supported in future file systems", and just that sentence is enough for me not to use that 'feature'.

(As a side-note, Winrar Archiver has the option to include the NTFS file streams when compressing files)

An alternative solution, that will involve programming: a system that stores the extra meta data in a file along-side the said files (think how Google Picasa stores it's .ini files along with your pictures).

invert

Posted 2009-11-05T09:59:41.643

Reputation: 4 918

1

clsturgeon

Posted 2009-11-05T09:59:41.643

Reputation: 166

1

Assuming your hard drive is formatted NTFS, you can use Alternate Data Streams to store any data or metadata you want, but it'll take a little programming. Alternate Data Streams are used by Explorer to store the info in a file's Summary tab of its property sheet (excluding Office files, which store the data internally).

Hugh Allen

Posted 2009-11-05T09:59:41.643

Reputation: 8 620

Just to note that these are lost when file is copied to FAT disk or downloaded from the web. – harrymc – 2009-11-05T11:14:05.267

@harrymc: same is true for any metadata scheme that doesn't involve embedding into the file -- making a copy may the metadata, depending on circumstances. designing any data-format scheme means making choices, hopefully after careful consideration of the use case(s). – quack quixote – 2009-11-05T11:28:23.867

Sysinternals has a neat command line utility to view the names and sizes of streams associated with a file: http://technet.microsoft.com/en-us/sysinternals/bb897440.aspx

– invert – 2009-11-05T14:49:44.910