设置自定义元数据以文件的任何类型自定义、类型、文件

2023-09-04 23:31:28 作者:村姑也狠潮丶

有没有办法设置自定义元数据的任何类型的文件?我想,当文件被重命名,移动或复制的元数据被复制。我不想使用ADS。

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.

推荐答案

没有。在某些时候,你的元数据刚刚成为数据应存储的内部(或)文件本身。

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:

连接code。在文件路径中的元数据(即使用的文件夹名称包含元数据) 重命名文件和连接code。在文件名中的元数据 创建一个单独的文件(如TXT或XML),并用该文件它的.zip(许多现代的文件格式,做到这一点,例如.DOCX的.xlsx等只是ZIP文件)

也可以硬着头皮有一个单独的数据库到文件系统。一些文件格式允许文件本身(如MP3)

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)