WSH » WshSpecialFolders » length

Syntax:
object.length

The length property is read only and returns a Long value which is the number of items in the collection.

For JScript consistency, length should be lowercase.

Examples

Code:
WshShell = WScript.CreateObject("WScript.Shell") ;
WshSpecialFolders = WshShell.SpecialFolders ;
intNum = WshSpecialFolders.length ;
WScript.Echo ("There are ", intNum, " Special Folders on this machine.") ;
 
Output:
There are 18 Special Folders on this machine.
Explanation:

This JScript code uses the length property to retrieve the number of special folders found on the current system.

Language(s): JavaScript