Count

 

Description

 

Returns the number of files in the collection.

 

PowerBASIC Syntax

 

PROPERTY GET Count () AS LONG

 

Return Value

 

LONG. The number of files in the collection.

 

Example [PowerBASIC]

 

#INCLUDE "windows.inc"

#INCLUDE "scrrun.inc"

 

DIM fso AS IFileSystem

DIM pDrives AS IDriveCollection

DIM nDrives AS LONG

 

' Create an instance of the FileSystemObject

fso = NEWCOM "Scripting.FileSystemObject"

' Get a reference to the IDrives collection

pDrives = fso.GetDrives

' Get the number of drives

nDrives = pDrives.Count

 

Valid XHTML 1.0 Transitional