Diese Funktion ruf die Gesamtgröße eines Laufwerks ab.
Public Function GetTotalDiskSpace(ByVal DriveLetter As String) As Long
Try
Dim DI As New DriveInfo(DriveLetter)
Return DI.TotalSize
Catch ex As Exception
Return -1
End Try
End Function
4 Kommentare zum Snippet