JScript  

Folders Collection

[This is preliminary documentation and subject to change]

Collection of all Folder objects contained within a Folder object.

Remarks

The following example illustrates how to get a Folders collection and how to iterate the collection using the Enumerator object and the for statement:

function ShowFolderList(folderspec)
{
   var fso, f, fc, s;
   fso = new ActiveXObject("Scripting.FileSystemObject");
   f = fso.GetFolder(folderspec);
   fc = new Enumerator(f.SubFolders);
   s = "";
   for (; !fc.atEnd(); fc.moveNext())
   {
      s += fc.item();
      s += "<br>";
   }
   return(s);
}

Methods

Add Method (Folders)

Properties

Count Property | Item Property

See Also

Drive Object | Drives Collection | File Object | Files Collection | Folder Object | SubFolders Property