Property: RootFolder for Drive
- Updated2024-09-12
- 1 minute(s) read
FileSystemObject and Dictionary > Properties > Property: RootFolder for Drive
Property: RootFolder for Drive
Returns the Folder object of the root folder of a drive.
The following example specifies the path of the root folder.
Function RootPath(sDrv) Dim fso, oMyDrive Set fso = CreateObject("Scripting.FileSystemObject") Set oMyDrive = fso.GetDrive(fso.GetDriveName(fso.GetAbsolutePathName(sDrv))) RootPath = "Root: " & oMyDrive.RootFolder.Path End Function