Files Property

 

Description

 

Returns a Files collection consisting of all File objects contained in the specified folder, including those with hidden and system file attributes set.

 

PowerBASIC Syntax

 

PROPERTY GET Files () AS IFileCollection

 

Return Value

 

IDispatch. Reference to a IFileCollection interface.

 

Example [PowerBASIC]

 

#INCLUDE "windows.inc"

#INCLUDE "scrrun.inc"

 

DIM fso AS IFileSystem

DIM pFolder AS IFolder

DIM pFiles AS IFileCollection

 

' Create an instance of the FileSystemObject

fso = NEWCOM "Scripting.FileSystemObject"

' Get a reference to the IFolder interface

pFolder = fso.GetFolder(UCODE$("C:\MyFolder"))

' Get a reference to the files collection

pFiles = pFolder.Files

 

Valid XHTML 1.0 Transitional