Property: Size for Folder
- Updated2024-09-12
- 1 minute(s) read
FileSystemObject and Dictionary > Properties > Property: Size for Folder
Property: Size for Folder
Specifies the size of a folder including subfolders.
Object.Size
| Object | Folder Object with this property |
| Object.Size | Variant with read access |
The following example returns the size of a folder:
Function ShowFolderSize(sFolder) Dim fso, oMyFolder Set fso = CreateObject("Scripting.FileSystemObject") Set oMyFolder = fso.GetFolder(sFolder) ShowFolderSize = "Size: " & oMyFolder.Size End Function