Microsoft® Windows® 2000 Scripting Guide
« Previous | Next »
To retrieve the properties of a folder, a script must:
When working with folder properties, note that the Files property and the Subfolders property both return collections rather than a single item. In addition, the Attributes property is returned as a bitmap value. A more detailed explanation of how to work with each of these properties is provided in subsequent sections of this chapter.
The script in Listing 4.12 uses the GetFolder method to bind to the folder C:\FSO and then echoes a number of properties for that folder.
Listing 4.12 Binding to a Specific Folder Using the GetFolder Method
|
|
When this script runs under CScript, output similar to the following appears in the command window:
Date created: 2/7/2002 10:27:50 AM Date last accessed: 2/13/2002 8:57:18 AM Date last modified: 2/13/2002 8:57:18 AM Drive: C: Is root folder: False Name: FSO Parent folder: C:\ Path: C:\FSO Short name: FSO Short path: C:\FSO Size: 0 Type: File Folder
Send us your feedback | « Previous | Next » |