3

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

2
  • "archive"? "read-only"? are you talking about DOS file attributes? (or worse, reimplementing same?) xxcopy.com/xxcopy06.htm Commented Nov 5, 2009 at 10:09
  • No. similar to those attributes, I need to implement custom attributes
    – bdhar
    Commented Nov 5, 2009 at 10:18

3 Answers 3

3

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).

2

Check out: Capturing file metadata

2

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).

3
  • Just to note that these are lost when file is copied to FAT disk or downloaded from the web.
    – harrymc
    Commented Nov 5, 2009 at 11:14
  • @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). Commented Nov 5, 2009 at 11:28
  • Sysinternals has a neat command line utility to view the names and sizes of streams associated with a file: technet.microsoft.com/en-us/sysinternals/bb897440.aspx
    – invert
    Commented Nov 5, 2009 at 14:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .