2

I want to programmatically add a small piece of metadata to some files of arbitrary type. I am considering using either ADS or DSOFile. Is either option preferable? What are the pros and cons? Are there significant differences in efficiency or robustness?

kgh
  • 157
  • 1
  • 12

2 Answers2

2

ADS is a robust solution - it's on a file system level - as long as your files stay on NTFS and you can control what will happen to them. If you'd be moving them over the network, to FAT32, or archive them, you'll lose what's in ADS. Some software also creates new file on save (so far I know, Adobe Illustrator did that). I think that DSOFile is less supported, in that case I'd rather choose XMP.

You can also consider extended file properties, see Getting Extended File Properties in C# .net

Community
  • 1
  • 1
Robert Goldwein
  • 5,805
  • 6
  • 33
  • 38
  • Will the data also be lost if I use DSOFile and transfer the file to a non-NTFS system? Also, can you give a little more information about XMP and whether it would be useful in my situation? – kgh Jan 22 '15 at 15:57
  • The problem with DSO is that it's (it was) Office specific and I believe it's no longer supported and quite badly documented. XMP is similar, but well documented, multi-platform technology - see http://www.adobe.com/products/xmp.html - it's useful when you want to add metadata to (mostly) graphic documents and it's readable by any XMP-enabled application. For genereal application, I'd choose ADS (with caution), or Extended file properties. – Robert Goldwein Jan 23 '15 at 13:53
0
  1. To my understanding, DSOFile writes to the ADS, particularly for custom properties.
  2. DSOFile is not Office specific as it writes data to the ADS of any NTFS file. I currently use it extensively for this purpose on PDF, DWG files.
  3. With ADS (of which DSOFile is an old 2005 implementation), the data WILL be lost as Rob Goldwein noted if transferred to non-NTFS filesystem. With windows, it actually prompts/notify's user when transferring data to usb for instance.
RobG
  • 53
  • 6