Hello friends, the following script should return the size of the selected
drive but it is getting only 0.
String Function GetDrive_Sizes ()
Var
Int i,
String sReturn, String sDrive, String sDrives,
Object oSystem, Object oDrive, Object oNull
Let oSystem = ObjectCreate("Scripting.FileSystemObject")
Let sDrives = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Let i = 1
While i <= 26
Let sDrive = Substring(sDrives, i, 1)
If oSystem.DriveExists(sDrive) Then
SayString ("drive found") ;debug
SayString (SDrive);to see which drive is found
Let oDrive = oSystem.GetDrive(sDrive)
If oDrive.IsReady Then
SayString ("Drive is ready") ;debug
Let sReturn = sReturn + "\n"+sDrive
Var int size = ODrive.AvailableSpace;it is 0.
;Var int size = ODrive.TotalSize;also 0
SayInteger (Size )
EndIf
;EndIf
Let oDrive = oNull
EndIf
;EndIf
Let i = i + 1
EndWhile
Let oSystem = oNull
Return sReturn
EndFunction
--- Disclaimer ---
The information in this mail is confidential and is intended solely for
addressee. Access to this mail by anyone else is unauthorized. Copying or
further distribution beyond the original recipient may be unlawful. Any opinion
expressed in this mail is that of sender and does not necessarily reflect that
of State Bank group.
---
__________�
View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts