Shell Objects

Shell Objects

The following objects are implemented by the shell for use in scripting and Visual Basic.

Objects
Folder
FolderItem
FolderItems
FolderItemVerb
FolderItemVerbs
Shell
ShellFolderView
ShellUIHelper
ShellWindows


Folder Object

The Folder object represents a shell folder. It contains properties and methods that allow you to get information about the folder.
Properties
Methods


Folder object properties

The Folder object has the following properties:
Application
Parent
ParentFolder
Title


Application Property

Description

Contains the Application object of the folder. This is a read-only property.

Syntax

object.Application

ParameterDescription
object Required. An object expression that evaluates to a Folder object.


Parent Property

Description

Contains the object's parent object. This is a read-only property.

Syntax

object.Parent

ParameterDescription
object Required. An object expression that evaluates to a Folder object.


ParentFolder Property

Description

Contains the parent Folder object. This is a read-only property.

Syntax

object.ParentFolder

ParameterDescription
object Required. An object expression that evaluates to a Folder object.


Title Property

Description

Contains the title of the folder. This is a read-only property.

Syntax

object.Title

ParameterDescription
object Required. An object expression that evaluates to a Folder object.


Folder object methods

The Folder object has the following methods:
CopyHere
GetDetailsOf
Items
MoveHere
NewFolder
ParseName


CopyHere Method

Description

Copies an item or items to a folder.

Syntax

object.CopyHere vItem, [vOptions]

ParameterDescription
object Required. An object expression that evaluates to a Folder object. This is the folder to which the item or items will be copied.
vItem Required. Specifies the item or items to copy. This can be a string that represents a file name, a FolderItem object, or a FolderItems object.
vOptions Optional. Specifies options for the copy operation. This can be zero or a combination of the FOF_ flags described under the fFlags member of the SHFILEOPSTRUCT structure.


GetDetailsOf Method

Description

Retrieves information about an item in a folder.

Syntax

object.GetDetailsOf vItem, iColumn

ParameterDescription
object Required. An object expression that evaluates to a Folder object.
vItem Required. Specifies the item for which to get the information. This must be a FolderItem object.
iColumn Required. 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:
0     Retrieves the name of the item.
1 Retrieves the size of the item.
2 Retrieves the type of the item.
3 Retrieves the date and time that the item was last modified.
4 Retrieves the attributes of the item.
-1 Retrieves the info tip information for the item.


Items Method

Description

Retrieves a FolderItems object that represents the collection of items in the folder.

Syntax

object.Items

ParameterDescription
object Required. An object expression that evaluates to a Folder object.


MoveHere Method

Description

Moves an item or items to this folder.

Syntax

object.MoveHere vItem, [vOptions]

ParameterDescription
object Required. An object expression that evaluates to a Folder object. This is the folder to which the item or items will be moved.
vItem Required. Specifies the item or items to move. This can be a string that represents a file name, a FolderItem object, or a FolderItems object.
vOptions Optional. Specifies options for the move operation. This can be zero or a combination of the FOF_ flags described under the fFlags member of the SHFILEOPSTRUCT structure.


NewFolder Method

Description

Creates a new folder.

Syntax

object.NewFolder bName, [vOptions]

ParameterDescription
object Required. An object expression that evaluates to a Folder object. This is the folder in which the new folder will be created.
bName Required. A string that specifies the name of the new folder.
vOptions Optional. This value is not currently used.


ParseName Method

Description

Creates and returns a FolderItem object that represents a specified item.

Syntax

object.ParseName bName

ParameterDescription
object Required. An object expression that evaluates to a Folder object. This is the folder in which the new folder will be created.
bName Required. A string that specifies the name of the item.


FolderItem Object

The FolderItem object represents an item in a shell folder. It contains properties and methods that allow you to get information about the item.
Properties
Methods


FolderItem object properties

The FolderItem object has the following properties:
Application
GetFolder
GetLink
IsBrowsable
IsFileSystem
IsFolder
IsLink
ModifyDate
Name
Parent
Path
Size
Type


Application Property

Description

Contains the Application object of the folder item. This is a read-only property.

Syntax

object.Application

ParameterDescription
object Required. An object expression that evaluates to a FolderItem object.


GetFolder Property

Description

Contains the item's Folder object if the item is a folder. This is a read-only property.

Syntax

object.GetFolder

ParameterDescription
object Required. An object expression that evaluates to a FolderItem object.

See Also

IsFolder Property


GetLink Property

Description

Contains the item's IShellLinkDual object if the item is a shortcut. This is a read-only property.

Syntax

object.GetLink

ParameterDescription
object Required. An object expression that evaluates to a FolderItem object.

See Also

IsLink Property


IsBrowsable Property

Description

Indicates if the item can be browsed. This property is TRUE if the item can be browsed or FALSE if not. This is a read-only property.

Syntax

object.IsBrowsable

ParameterDescription
object Required. An object expression that evaluates to a FolderItem object.


IsFileSystem Property

Description

Indicates if the item is part of the file system. This property is TRUE if the item is part of the file system or FALSE if not. This is a read-only property.

Syntax

object.IsFileSystem

ParameterDescription
object Required. An object expression that evaluates to a FolderItem object.


IsFolder Property

Description

Indicates if the item is a folder. This property is TRUE if the item is a folder or FALSE if not. This is a read-only property.

Syntax

object.IsFolder

ParameterDescription
object Required. An object expression that evaluates to a FolderItem object.


IsLink Property

Description

Indicates if the item is a shortcut. This property is TRUE if the item is a shortcut or FALSE if not. This is a read-only property.

Syntax

object.IsLink

ParameterDescription
object Required. An object expression that evaluates to a FolderItem object.


ModifyDate Property

Description

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

Syntax

object.ModifyDate

ParameterDescription
object Required. An object expression that evaluates to a FolderItem object.


Name Property

Description

Contains the name of the item.

Syntax

object.Name

ParameterDescription
object Required. An object expression that evaluates to a FolderItem object.


Parent Property

Description

Contains the parent object of the item. This is a read-only property.

Syntax

object.Parent

ParameterDescription
object Required. An object expression that evaluates to a FolderItem object.


Path Property

Description

Contains the full path and name of the item. This is a read-only property.

Syntax

object.Path

ParameterDescription
object Required. An object expression that evaluates to a FolderItem object.


Size Property

Description

Contains the size of the item, in bytes. This is a read-only property.

Syntax

object.Size

ParameterDescription
object Required. An object expression that evaluates to a FolderItem object.


Type Property

Description

Contains a string representation of the item's type. This is a read-only property.

Syntax

object.Type

ParameterDescription
object Required. An object expression that evaluates to a FolderItem object.


FolderItem object methods

The FolderItem object has the following methods:
InvokeVerb
Verbs


InvokeVerb Method

Description

Executes a verb on a shell item.

Syntax

object.InvokeVerb [vVerb]

ParameterDescription
object Required. An object expression that evaluates to a FolderItem object.
vVerb Optional. A string that specifies the verb to be executed. This must be one of the values returned by the item's FolderItemVerb.Name property.

See Also

FolderItem.Verbs, FolderItemVerb.DoIt


Verbs Method

Description

Retrieves the item's FolderItemVerbs object, which is the collection of verbs that can be executed on the item.

Syntax

object.Verbs

ParameterDescription
object Required. An object expression that evaluates to a FolderItem object.

See Also

FolderItem.InvokeVerb, FolderItemVerb.DoIt


FolderItems Object

The FolderItems object represents the collection of items in a shell folder. It contains properties and methods that allow you to get information about the collection.
Properties
Methods


FolderItems object properties

The FolderItems object has the following properties:
Application
Count
Parent


Application Property

Description

Contains the Application object of the folder items collection. This is a read-only property.

Syntax

object.Application

ParameterDescription
object Required. An object expression that evaluates to a FolderItems object.


Count Property

Description

Contains the number of items in the collection. This is a read-only property.

Syntax

object.Count

ParameterDescription
object Required. An object expression that evaluates to a FolderItems object.


Parent Property

Description

Contains the parent object of the collection. This is a read-only property.

Syntax

object.Parent

ParameterDescription
object Required. An object expression that evaluates to a FolderItems object.


FolderItems object methods

The FolderItems object has the following methods:
Item
_NewEnum


Item Method

Description

Retrieves the FolderItem object for a specified item in the collection.

Syntax

object.Item [index]

ParameterDescription
object Required. An object expression that evaluates to a FolderItems object.
index Optional. Specifies the zero-based index of the item to retrieve. This value must be less than the value of the Count property.


_NewEnum Method

Description

Creates and returns a new FolderItems object that is a copy of this FolderItems object.

Syntax

object._NewEnum

ParameterDescription
object Required. An object expression that evaluates to a FolderItems object.


FolderItemVerb Object

The FolderItemVerb object represents the verbs or commands to which an item in a shell folder responds. It contains properties and methods that allow you to get information about the collection.
Properties
Methods


FolderItemVerb object properties

The FolderItemVerb object has the following properties:
Application
Name
Parent


Application Property

Description

Contains the Application object of the object. This is a read-only property.

Syntax

object.Application

ParameterDescription
object Required. An object expression that evaluates to a FolderItemVerb object.


Name Property

Description

Contains the name of the verb. This is a read-only property.

Syntax

object.Name

ParameterDescription
object Required. An object expression that evaluates to a FolderItemVerb object.


Parent Property

Description

Contains the parent object of the object. This is a read-only property.

Syntax

object.Parent

ParameterDescription
object Required. An object expression that evaluates to a FolderItemVerb object.


FolderItemVerb object methods

The FolderItemVerb object has the following method:
DoIt


DoIt Method

Description

Executes the verb on the FolderItem associated with the verb.

Syntax

object.DoIt

ParameterDescription
object Required. An object expression that evaluates to a FolderItemVerb object.


FolderItemVerbs Object

The FolderItemVerbs object represents the collection of verbs for an item in a shell folder. It contains properties and methods that allow you to get information about the collection.
Properties
Methods


FolderItemVerbs object properties

The FolderItemVerbs object has the following properties:
Application
Count
Parent

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.