Property: Name for Folder
- Updated2024-09-12
- 1 minute(s) read
FileSystemObject and Dictionary > Properties > Property: Name for Folder
Property: Name for Folder
Specifies the name of a folder.
Object.Name
| Object | Folder Object with this property |
| Object.Name | String with read and write access |
The following example displays various folder information:
Function ShowFolderInfo(sFolder) Dim fso, oMyFolder, sOutput Set fso = CreateObject("Scripting.FileSystemObject") Set oMyFolder = fso.GetFolder(sFolder) sOutput = "Folder: " & oMyFolder.Name & VBCrLf sOutput = sOutput & "Created: " & oMyFolder.DateCreated & VBCrLf sOutput = sOutput & "Last Accessed: " & oMyFolder.DateLastAccessed & VBCrLf sOutput = sOutput & "Last Modified: " & oMyFolder.DateLastModified ShowFolderInfo = sOutput End Function