Shell32.Folder.GetDetailsOf(..,..)有哪些可用选项? [英] What options are available for Shell32.Folder.GetDetailsOf(..,..)?

查看:880
本文介绍了Shell32.Folder.GetDetailsOf(..,..)有哪些可用选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到使用 GetDetailsOf()来获取有关外壳项目的详细信息的答案,但是数字始终是魔术数字。

I've seen answers using GetDetailsOf() to get details about shell items, but the numbers are always magic numbers.

我已经查看了 FolderItem GetDetailsOf ,但是什么也没找到。 (后者中的列表并不适用于所有内容。它们不包含描述,作者或回收站删除日期...)

I've looked at the docs for both FolderItem and GetDetailsOf but found nothing. (The list in the latter is not for everything. They don't cover "Description", "Authors", nor the recycle bin delete date...)

是有一些方法可以返回某项的可能选项吗?

Is there some method that will return the possible options for an item? Is it listed somewhere?

推荐答案

我偶然发现了这个问题。如果将 null 传递给 GetDetailsOf ,则它将以列名作为响应。例如,使用 cscript 执行以下JScript:

I figured this out by accident. If you pass null into GetDetailsOf then it responds with the column names. For example, execute the following JScript with cscript:

var shellapp = WScript.CreateObject("Shell.Application");
var folder = shellapp.NameSpace("D:\\");
for (var j = 0; j < 0xFFFF; j++) {
    detail = folder.GetDetailsOf(null, j);
    if (!detail) {
        break;
    }
    WScript.Echo("[" + j + "] = " + detail);
}

在我的Windows 10系统上,此输出为:

On my Windows 10 system this outputs:

[0] = Name
[1] = Size
[2] = Item type
[3] = Date modified
[4] = Date created
[5] = Date accessed
[6] = Attributes
[7] = Offline status
[8] = Availability
[9] = Perceived type
[10] = Owner
[11] = Kind
[12] = Date taken
[13] = Contributing artists
[14] = Album
[15] = Year
[16] = Genre
[17] = Conductors
[18] = Tags
[19] = Rating
[20] = Authors
[21] = Title
[22] = Subject
[23] = Categories
[24] = Comments
[25] = Copyright
[26] = #
[27] = Length
[28] = Bit rate
[29] = Protected
[30] = Camera model
[31] = Dimensions
[32] = Camera maker
[33] = Company
[34] = File description
[35] = Program name
[36] = Duration
[37] = Is online
[38] = Is recurring
[39] = Location
[40] = Optional attendee addresses
[41] = Optional attendees
[42] = Organizer address
[43] = Organizer name
[44] = Reminder time
[45] = Required attendee addresses
[46] = Required attendees
[47] = Resources
[48] = Meeting status
[49] = Free/busy status
[50] = Total size
[51] = Account name

这与Windows 2000完全不同如获取扩展文件属性中所述。顺便说一句,如果您传入其他 NameSpace ,那么您将获得不同的属性。在我的示例中,我问驱动器 D:上的文件可使用哪些属性,具体取决于其格式。

And this is quite different from Windows 2000 as detailed from Retrieving Extended File Properties. Incidentally if you pass in a different NameSpace then you're going to get different attributes. In my example, I'm asking what attributes are available for files on drive D: which could be different depending on its format.

这篇关于Shell32.Folder.GetDetailsOf(..,..)有哪些可用选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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