Table of contents
Collapse the table of content
Expand the table of content

Files Property

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Description Returns a Files collection consisting of all File objects contained in the specified folder, including those with hidden and system file attributes set. Syntaxobject. Files The object is always a Folder object. Remarks The following code illustrates the use of the Files property:

Sub ShowFileList(folderspec)
    Dim fs, f, f1, fc, s
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set f = fs.GetFolder(folderspec)
    Set fc = f.Files
    For Each f1 in fc
        s = s &; 
        s = s &;  vbCrLf
    MsgBox s
End Sub
© 2018 Microsoft