|
-
July 10th, 2000, 12:44 PM
#1
VB6 Disk Space
How do I find out how much of free disk space I got via a VB6 program?
-
July 10th, 2000, 01:40 PM
#2
-
July 10th, 2000, 01:55 PM
#3
Re: VB6 Disk Space
Dim FilSysObj As Scripting.FileSystemObject
Dim DriveCollection As Drives
Dim objDrive As Drive
Private Sub Main()
Set FilSysObj = New Scripting.FileSystemObject
Set DriveCollection = FilSysObj.Drives
For Each objDrive In DriveCollection
If objDrive.DriveType = 3 Then 'Network Drive
MsgBox objDrive.ShareName
If objDrive.IsReady Then
MsgBox objDrive.AvailableSpace
MsgBox objDrive.TotalSize
'Subtract AvalableSpace from Total Size
'You can also use objDrive.FreeSpace
End If
End If
Next
End Sub
Iouri Boutchkine
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|