Drive Object

AvailableSpaceHow much space is available on the drive in bytes.
DriveLetterWhat letter is assigned to the drive.
DriveTypeWhat type of drive it is, such as removable, fixed, network, CD-ROM, or RAM disk.
FileSystemThe type of file system the drive uses, such as FAT, FAT32, NTFS, and so forth.
FreeSpaceHow much space is available on the drive in bytes.
IsReadyWhether a drive is available for use.
PathThe path.
RootFolderThe root folder of the drive.
SerialNumberThe drive's serial number.
ShareNameThe name of the share.
TotalSizeThe total size of the drive in bytes.
VolumeNameThe 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


© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext