All Properties
Property: WshSpecialFolders.length
object.
length
The
length
property is read only and returns a Long value which is the number of items in the collection.
The following JScript code uses the
length
property to retrieve the number of special folders found on the current system.
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.
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information