Folders.Count

JScript1.0+Syntax

							folderscollection.Count

Description

The Count property of the Folders collection returns the number of folders in the collection. Folders are added to this collection by using the Folders.Add() method.

Example

Listing 9.116 is run in an Internet Explorer browser, and it contains a single button. When the button is clicked, an alert box pops up displaying the number of folders in the Folders collection.

Listing 9.116 Accessing the Count Property
 <html> <body> <script language="JScript"> <!-- Hide function get(){ // Create an instance of the FileSystemObject var myFileSysObj = new ActiveXObject("Scripting.FileSystemObject"); // Create two instances of the Folder object for the "temp" folder var myFolder = ...

Get Pure JavaScript 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.