FindFirst Method  
 

Find the first stored object that matches a label or content type.

Syntax

object.FindFirst( [MatchLabel], [ContentType] )

Parameters

MatchLabel
A string which specifies the value to match against the object labels in the container. The string may contain wildcard characters similar to those use with the Windows filesystem. A "?" character matches any single character, and "*" matches any number of characters in the label. If this parameter is omitted or an empty string, all objects in the container will be matched.
ContentType
A string which specifies the content type of the objects to be enumerated. If this parameter is omitted or an empty string, the content type is ignored and all matching objects are returned. If a content type is specified, it must be a valid MIME media content type designated using the type/subtype nomenclature.

Return Value

A value of True is returned if a matching object exists. Otherwise, a value of False is returned and the LastError property will return the specific cause of the failure.

Remarks

The FindFirst method returns information about the first object that matches a given label, content type or both. It is used in conjunction with the FindNext method to enumerate all of the matching objects in the storage container.

If a matching object exists, various properties that return information about the current object, such as ObjectId and ObjectSize will be updated to return the metadata associated with the object.

See Also

Exists Method, FindNext Method