Folder.GetDetailsOf method

Retrieves details about an item in a folder. For example, its size, type, or the time of its last modification.


retVal = Folder.GetDetailsOf(



Type: Variant

The item for which to retrieve the information. This must be a FolderItem object.


Type: Integer

An Integer value that specifies the information to be retrieved. The information available for an item depends on the folder in which it is displayed. This value corresponds to the zero-based column number that is displayed in a Shell view. For an item in the file system, this can be one of the following values:


Retrieves the name of the item.


Retrieves the size of the item.


Retrieves the type of the item.


Retrieves the date and time that the item was last modified.


Retrieves the attributes of the item.


Retrieves the info tip information for the item.

Return value

Type: BSTR*

String containing the retrieved detail.



Not all methods are implemented for all folders. For example, the ParseName method is not implemented for the Control Panel folder (CSIDL_CONTROLS). If you attempt to call an unimplemented method, a 0x800A01BD (decimal 445) error is raised.



The following example uses GetDetailsOf to retrieve the type of the file named Clock.avi. Proper usage is shown for JScript, VBScript, and Visual Basic.


<script language="JScript">
    function fnGetDetailsOfJ()
        var objShell = new ActiveXObject("shell.application");
        var objFolder = new Object;
        objFolder = objShell.NameSpace("C:\\WINDOWS");
        if (objFolder != null)
            var objFolderItem = new Object;

            objFolderItem = objFolder.ParseName("clock.avi");
            if (objFolderItem != null)
                var objInfo = new Object;

                objInfo = objFolder.GetDetailsOf(objFolderItem, 2);


<script language="VBScript">
    function fnGetDetailsOfVB()
        dim objShell
        dim objFolder
        set objShell = CreateObject("shell.application")
        set objFolder = objShell.NameSpace("C:\WINDOWS")

        if (not objFolder is nothing) then
            dim objFolderItem

            set objFolderItem = objFolder.ParseName("clock.avi")

            if (not objFolderItem Is Nothing) then
                dim objInfo
                objInfo = objFolder.GetDetailsOf(objFolderItem, 2)
            end if
            set objFolderItem = nothing
        end if
        set objFolder = nothing
        set objShell = nothing
    end function

Visual Basic:

Private Sub btnGetDetailsOf_Click()
    Dim objShell  As Shell
    Dim objFolder As Folder

    Set objShell = New Shell
    Set objFolder = objShell.NameSpace("C:\WINDOWS")
    If (Not objFolder Is Nothing) Then
        Dim objFolderItem As FolderItem
        Set objFolderItem = objFolder.ParseName("clock.avi")
        If (Not objFolderItem Is Nothing) Then
            Dim szItem As String
            szItem = objFolder.GetDetailsOf(objFolderItem, 2)
        End If
        Set objFolderItem = Nothing
    End If
    Set objFolder = Nothing
    Set objShell = Nothing
End Sub


Requirement Value
Minimum supported client
Windows 2000 Professional, Windows XP [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Shlobj_core.h (include Shldisp.h)
Shell32.dll (version 4.71 or later)