Diese Funktion ruft den freien Speicher eines Laufwerks ab.
Public Function GetFreeDiskSpace(ByVal DriveLetter As String) As Long
Try
Dim DI As New DriveInfo(DriveLetter)
Return DI.TotalFreeSpace
Catch ex As Exception
Return -1
End Try
End Function
Kommentare zum Snippet