Mega Code Archive

 
Categories / VisualBasic Script / File Path
 

The NumberOfBytesFree Function

Function NumberOfBytesFree(ByVal strDrive As String) As String    Dim lngSectors As Long    Dim lngBytes As Long    Dim lngFreeClusters As Long    Dim lngTotalClusters As Long    Dim intErrNum As Integer    intErrNum = abGetDiskFreeSpace(strDrive, lngSectors, _    lngBytes, lngFreeClusters, lngTotalClusters)    NumberOfBytesFree = " with " & _          Format((CDbl(lngBytes) * CDbl(lngSectors)) * _          CDbl(lngFreeClusters), "#,##0") & _          " Bytes Free" End Function