VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Find Drive Details Without Using API

by Buddhika Fernando (9 Submissions)
Category: Files/File Controls/Input/Output
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Wed 2nd February 2005
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Find Drive Details Without Using API

API Declarations



Private FSYS As New Scripting.FileSystemObject
Private X As Drive



Rate Find Drive Details Without Using API



    On Error Resume Next
    Dim DV, D
    Set DV = FSYS.Drives
    
    List1.Clear
    For Each D In DV
        List1.AddItem D.DriveLetter & vbTab & vbTab & _
                      D.DriveType & vbTab & _
                      D.FileSystem & vbTab & _
                      Format(((D.TotalSize / 1024) / 1024), "#,#0") & vbTab & _
                      Format(((D.AvailableSpace / 1024) / 1024), "#,#0") & vbTab & _
                      Format(((D.FreeSpace / 1024) / 1024), "#,#0") & vbTab & _
                      D.VolumeName
                      
    Next
End Sub

Download this snippet    Add to My Saved Code

Find Drive Details Without Using API Comments

No comments have been posted about Find Drive Details Without Using API. Why not be the first to post a comment about Find Drive Details Without Using API.

Post your comment

Subject:
Message:
0/1000 characters