18.01.2013 Views

VBScript Reference Manual for InduSoft Web Studio

VBScript Reference Manual for InduSoft Web Studio

VBScript Reference Manual for InduSoft Web Studio

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>VBScript</strong> <strong>Reference</strong> <strong>Manual</strong> <strong>InduSoft</strong> <strong>Web</strong> <strong>Studio</strong><br />

Drive Object<br />

The Drive object provides access to the properties of a particular disk drive or network shared drive.<br />

Drive Object Properties<br />

Properties Description<br />

AvailableSpace The amount of space available to a user on the specified drive or network share.<br />

DriveLetter The drive letter of a physical local drive or network share<br />

DriveType A value indicating the type of a drive.<br />

FileSystem The amount of free space available to a user on the drive or network share.<br />

FreeSpace The amount of free space available to a user on the drive or network share.<br />

IsReady True if the drive is ready, False if not.<br />

Path The file system path <strong>for</strong> a drive.<br />

RootFolder A Folder object representing the root folder of a drive.<br />

SerialNumber The decimal serial number used to uniquely identify the disk volume.<br />

ShareName The network share name of a drive<br />

TotalSize The total space, in bytes, of a drive or network share<br />

VolumeName The volume name of a drive.<br />

The following code illustrates the use of the Drive object to access drive properties:<br />

Sub ShowFreeSpace(drvPath)<br />

Dim fs, d, s<br />

Set fs = CreateObject("Scripting.FileSystemObject")<br />

Set d = fs.GetDrive(fs.GetDriveName(drvPath))<br />

s = "Drive " & UCase(drvPath) & " - "<br />

s = s & d.VolumeName & vbCrLf<br />

s = s & "Free Space: " & FormatNumber(d.FreeSpace/1024, 0)<br />

s = s & " Kbytes"<br />

Response.Write s<br />

End Sub<br />

32 <strong>InduSoft</strong>, Ltd.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!