Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
    
"archive"? "read-only"? are you talking about DOS file attributes? (or worse, reimplementing same?) xxcopy.com/xxcopy06.htm –  quack quixote Nov 5 '09 at 10:09
    
No. similar to those attributes, I need to implement custom attributes –  bdhar Nov 5 '09 at 10:18
add comment

3 Answers

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

share|improve this answer
    
Just to note that these are lost when file is copied to FAT disk or downloaded from the web. –  harrymc Nov 5 '09 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). –  quack quixote Nov 5 '09 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 Nov 5 '09 at 14:49
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.