Tutorial-Web Home > The FileSystem Object > The Drive Object

Object Menu

Drive
AvailableSpace
DriveLetter
DriveType
FileSystem
FreeSpace
IsReady
Path
RootFolder
SerialNumber
ShareName
TotalSize
VolumeName
File
Folder
FileSystem
TextStream

 


 
DriveType
TypeRead-Only
Return Value TypeNumerical
Usageobject.Type(Drive)
DescriptionReturns the drive type Unknown: 0, Removable: 1, Fixed Drive: 2, Network: 3, CD-ROM: 4, RAM Disk: 5.
ExampleCode:
drivename=''c:\''
Set fso = CreateObject(''Scripting.FileSystemObject'')
set maindrive=fso.GetDrive(drivename)
response.write maindrive.Type

Result:
0

The Bookworm
Search the Tutorial-Web library for books on any topic!
Sponsors

Search Now:
In Association with Amazon.com