获取扩展文件属性 [英] Getting extended file properties

查看:179
本文介绍了获取扩展文件属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找到了这篇文章

这说明了如何在.net中获取扩展文件属性。但是它指向的代码项目文章已有10年了。

That explains how to get extended file properties in .net. But it points to a Code Project article that is 10 years old.

线程本身已有5年了。

现在是否有更好的方法来获取扩展的文件属性,例如标题,子标题,情节名称等?

Is there a better way now to get extended file properties like Title, SubTitle, Episode Name etc.?

我真正想做的就是获取扩展文件有关单个文件的文件信息。在我看来,这段代码遍历目录并获取这些文件的文件信息。

What I would really like to do is to get the extended file information on individual files. It looks to me like this code loops through a directory and gets the file info on those files.

推荐答案

我已经使用了 Windows API代码包

ShellObject picture = ShellObject.FromParsingName(file);

var camera = picture.Properties.GetProperty(SystemProperties.System.Photo.CameraModel);
newItem.CameraModel = GetValue(camera, String.Empty, String.Empty);

var company = picture.Properties.GetProperty(SystemProperties.System.Photo.CameraManufacturer);
newItem.CameraMaker = GetValue(company, String.Empty, String.Empty);

链接到 Rob Sanders

这篇关于获取扩展文件属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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