ListFiles

<< Click to Display Table of Contents >>

 

ListFiles

ListFiles([FileClass], [Domain])

Returns a collection of objects from a certain class in a Domain. This method's parameters are the following:

FileClass: An optional String with the name of the class for an object. If the name of that class does not exist, this method returns a script error. If this parameter is omitted, this method returns a collection with all objects from the specified Domain. If the specified Domain does not contain any object from the specified class, this method returns an empty collection, that is, with zero items

Domain: An optional String with the name of a remote Domain. If this parameter is omitted, specifies the local Domain. If the remote Domain does not exist, this method returns a script error

 

The collection returned by this method contains the Count property, which indicates the number of existing objects, and the Item method, which allows accessing a specific item of that collection. This collection can also be used with VBScript's For Each statement.

 

NOTES

The Item method of the collection returned by this method allows access only by numerical index (starting at one).

By omitting the Domain parameter, and thus returning a collection of objects in the local Domain, users can list objects from the view context, that is, Viewers, Screens and Frames. In cases where the Domain parameter indicates a remote Domain, objects from the view context of that Domain are not returned by this method.

Was this page useful?