Does Windows support metadata for every file?

℡╲_俬逩灬. 提交于 2019-12-18 13:37:22

问题


I know things like images, music, videos support metadata. My idea is that I want to write a download manager that adds info to the files I download: the URL I downloaded it from, the date and time I downloaded it, possibly some more. For this to work I need to add info for more than just photos and videos. I could just save a hidden .XML flie, but if Windows supports this already then it would be better.


回答1:


There is a thing called an "Alternate Data Stream" which NTFS supprorts for any file. I'm not really sure what it's meant to be used for though.

The metadata that you see in JPG's (exif properties), MP3s (ID3 Tags) and whatnot are all proprietary to each file format, and Windows simply knows how to read those properties. Same goes for Modifed/Created/Accessed dates. There is no one method of storing this data.




回答2:


NTFS supports metadata, I've never thought about how to access it beyond what you can do by right-clicking on a file, clicking Properties and then Summary. You can edit existing metadata by clicking on the Value column.

There's a question on StackOverflow that's similar: How do you retrieve image tags From one of the answers there, there's a link to MSDN with more details of the Vista (and XP) Property System.




回答3:


In your case you should definitely use the NTFS alternate data streams as the information you want to attach would otherwise have to be supported by the downloaded file's format and you want to add this information to any file type.

Although you have to remember that information hidden in those streams may be lost when the file holding it is transferred over the network, to a non-NTFS flash drive or any other non-NTFS medium.



来源:https://stackoverflow.com/questions/1556382/does-windows-support-metadata-for-every-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!