Binding to Folders

To gain information about the properties or attributes of a folder, you must first bind to the folder. Because the File System Object represents folders as COM (Component Object Model) objects, you must create a reference to them prior to connecting to them—that is, you must bind to them. You already know that to create or delete a folder, you have to create an instance of FileSystemObject. After you do that, you use the GetFolder method to connect to the folder.

Get Microsoft® Windows® Scripting Self-Paced Learning Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.