Get or set file information programmatically

Try navigating to any file by right-clicking it and clicking the Details tab. Like this photo enter image description here

I want to change these values. I can also add custom properties to files. I especially want to do this for tif, jpeg, png, pdf files. Can I see my custom properties in the Details window?

I found this page, but it can only change office files. http://www.microsoft.com/en-us/download/details.aspx?id=8422

+3
source share
2 answers

You can use the Windows API Code Code . It has shells for the Windows property system.

+3
source

Eli Arbels , Windows Code Code Pack ( ):

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

if (prop.ValueType == typeof(string))
{
    (prop as ShellProperty<string>).Value = value;
}
+1

All Articles