简体   繁体   中英

Adding Custom File Properties/Attribute with Java or C# in Windows

Is it possible to add custom file attribute in file Properties preferably using Java, otherwise C#?

Custom fields I want to do is

  1. Don't let the file copy. (But it can be modified)
  2. Don't let the file attach to anything that that connects to network.

Here you can see below Where I want to add these attributes.

在此输入图像描述

First question is can I actually do this? If yes then how? Any Idea will be really appreciated.

No, not really. File Custom Properties were added in Vista, but they are really just metadata related to files (of a given extension) plus some COM interfaces to show them to the user, etc. Ie, you can index properties, display them, edit them, etc. but properties won't be able to keep a file from being read (and thus copied).

If you are interested, your can review the MS docs for file properties http://msdn.microsoft.com/en-us/library/windows/desktop/ff728898(v=vs.85).aspx . This page detailning the predined properties is probably the easiest way to see how are used http://msdn.microsoft.com/en-us/library/windows/desktop/dd561977(v=vs.85).aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM