Microsoft® Visual Basic® Scripting Edition RootFolder Property |
Scripting Run-Time Reference Version 3 |
Description
Returns a Folder object representing the root folder of a specified drive. Read-only.
Syntax
object.RootFolderThe object is always a Drive object.
Remarks
All the files and folders contained on the drive can be accessed using the returned Folder object.The following example illustrates the use of the RootFolder property:
Function ShowRootFolder(drvspec) Dim fso, f Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.GetDrive(drvspec) ShowRootFolder = f.RootFolder End Function