Jobs
Author: Buddhika Fernando Date Submitted: 2/2/2005 Category: File Manipulation Compatibility: VB 6,VB 5 This code has been accessed 3533 times.
Email Yourself this snippet:
Rem Add Microsoft Scripting Runtime Library Private FSYS As New Scripting.FileSystemObject Private X As Drive
Code
Private Sub Command1_Click() 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