Get or set file details programmatically [duplicate]

孤者浪人 提交于 2019-12-05 19:34:17

You can use the Windows API Code Pack. It has wrappers for the Windows Property System.

Just an addition to Eli Arbels answer, an example from the documentation from the Windows API Code Pack (which works very well for us):

IShellProperty prop = ShellObject.FromParsingName(fileName).Properties.GetProperty(propertyName);

if (prop.ValueType == typeof(string))
{
    (prop as ShellProperty<string>).Value = value;
}
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!