Drive Object
| AvailableSpace | How much space is available on the drive in bytes. |
| DriveLetter | What letter is assigned to the drive. |
| DriveType | What type of drive it is, such as removable, fixed, network, CD-ROM, or RAM disk. |
| FileSystem | The type of file system the drive uses, such as FAT, FAT32, NTFS, and so forth. |
| FreeSpace | How much space is available on the drive in bytes. |
| IsReady | Whether a drive is available for use. |
| Path | The path. |
| RootFolder | The root folder of the drive. |
| SerialNumber | The drive's serial number. |
| ShareName | The name of the share. |
| TotalSize | The total size of the drive in bytes. |
| VolumeName | The name of the volume. |
Sub ShowFolderInfo()
Dim fso, fldr, s
' Get instance of FileSystemObject.
Set fso = CreateObject("Scripting.FileSystemObject")
' Get Drive object.
Set fldr = fso.GetFolder("c:")
' Print parent folder name.
Response.Write "Parent folder name is: " & fldr &
' Print drive name.
Response.Write "Contained on drive " & fldr.Drive &
' Print root file name.
If fldr.IsRootFolder = True Then
Response.Write "This is the root folder." &
Else
Response.Write "This folder isn't a root folder."
End If
' Create a new folder with the FileSystemObject object.
fso.CreateFolder ("C:\Bogus")
Response.Write "Created folder C:\Bogus"
' Print the base name of the folder.
Response.Write "Basename = " & fso.GetBaseName("c:\bogus")
' Delete the newly created folder.
fso.DeleteFolder ("C:\Bogus")
Response.Write "Deleted folder C:\Bogus" &
End Sub
© 2025 Better Solutions Limited. All Rights Reserved. © 2025 Better Solutions Limited TopPrevNext