将标签添加到任何文件 [英] add tag to any file

查看:58
本文介绍了将标签添加到任何文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的程序创建了一个二进制文件.现在,我想向其中添加一个"PAN"属性,该属性应显示在Windows文件属性窗口的详细信息"选项卡中.有办法吗? MP3文件拥有它.所有文件都支持吗?
我想知道如何以编程方式进行操作?

I have a binary file created by my program. Now I want to add a ''PAN'' property to it which should be displayed in details tab of windows file property window. Is there a way to do it? MP3 files have it. is it supported for all files?
I would like to know how to do it programmatically ?

推荐答案

不,当然不是. MP3格式(以及某些其他媒体文件)具有的是元数据标签",它是文件管理器已知的,可以用来显示文件详细信息.这是文件内容的一部分,但不是文件属性的一部分.只有文件属性(例如名称,创建时间,最后修改和最后访问,归档",只读"属性等)才是文件系统对象的通用部分.

如果二进制文件格式需要类似的功能,则必须将所需的记录添加到此文件格式中,作为文件内容的一部分.

由于这是完全专有的元数据,因此操作系统将无法识别它是任何通用方式.
如果您需要系统Shell以某种专有方式处理此类文件,则可以执行此操作.
(我假设您要使用Windows.)

为此,您将需要学习和实现非常特定类型的应用程序,作为Shell的插件,称为 Shell Extension .您可以从此处开始: http://msdn.microsoft.com/zh-我们/library/cc144067(v=vs.85).aspx [
No, of course not. What a MP3 format (as well as some other media files) has is the meta-data "tag" which is known by file managers and can be used to show file details. This is a part of file content, but not of file attributes. Only the file attributes (such as name, time of creation, last modification and last access, "archive", "read-only" attributes, etc.) are the universal part of a file system object.

If you need similar feature for you binary file format, you will have to add desired record to this file format, as a part of file content.

As this is entirely proprietary meta-data, OS won''t be able to recognize it is any universal way.
If you need to process such files is some proprietary way by the system Shell, you can do it.
(I assume you want to use Windows.)

To achieve that, you will need to learn and implement very specific type of application working as a plug-in to the Shell, called Shell Extension. You can start here: http://msdn.microsoft.com/en-us/library/cc144067(v=vs.85).aspx[^].

—SA


这篇关于将标签添加到任何文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆