Set Custom Metadata to Files of any Type

此生再无相见时 提交于 2019-12-08 05:38:33

问题


Is there way to set custom metadata to files of any type? I want the metadata to be copied when the file is renamed, moved or copied. I don't want to use ADS.


回答1:


No. At some point your "metadata" just becomes "data" which should be stored inside (or with) the file itself.

If you are trying to avoid having a database, but store some sort of state data with the file, you have a few options:

  1. encode the metadata in the file path (ie. use the folder name to contain the metadata)
  2. rename the file and encode the metadata in the filename
  3. create a separate file (e.g. txt or xml) and .zip it with the file (lots of modern file formats do this e.g. .docx .xlsx etc are just zip files)

or you can bite the bullet and have a database separate to the file system. Some file formats allow metadata inside the file itself (e.g. MP3)



来源:https://stackoverflow.com/questions/9876956/set-custom-metadata-to-files-of-any-type

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