Diese Funktion fragt den belegten Speicherplatz eines Laufwerks ab.
Public Function GetUsedDiskSpace(ByVal DriveLetter As String) As Long
Try
Dim DI As New DriveInfo(DriveLetter)
Return DI.TotalSize - DI.TotalFreeSpace
Catch ex As Exception
Return -1
End Try
End Function
Kommentare zum Snippet