Using VBScript Objects

Unless you use the AddObject method to add more objects, VBScript knows about only a handful of objects, as listed in Table 13.7. If you set UseSafeSubset to True, then only the Err and Dictionary objects will be available. FileSystemObject and the other objects derived from it (Drive, Drives, File, Files, Folder, Folders, and TextStream) are considered unsafe, since they allow a script program direct access to disk files.

Table 13.7: Objects Available in VBScript

Object Description
Dictionary Stores a collection of key and data values
Drive Accesses information about a disk drive; part of FileSystemObject
Drives Stores a collection of Drive objects; part of FileSystemObject
Err Holds information about runtime errors
File Accesses information about the files in a directory; part of FileSystemObject
Files Stores a collection of File objects; part of FileSystemObject
FileSystemObject Provides object-oriented access files and directories
Folder Accesses folders; part of FileSystemObject
Folders Stores a collection of Folder objects; part of FileSystemObject
TextStream Accesses the contents of a file; part of FileSystemObject

© 1998 SYBEX Inc. All rights reserved.