Hi all,
Am in need of reading total space/Available space in a server,
I am able to get the size, if the server is mapped as a drive,
Here is the code i tried
Code:
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim allDr As DriveInfo()
        allDr = DriveInfo.GetDrives()
        For Each drv As DriveInfo In allDr
            If (drv.DriveType = DriveType.Network) Then
                Dim item2 As ListViewItem = New ListViewItem(drv.Name)
                Dim totsiz, freeSpace As Double
                totsiz = drv.TotalSize
                freeSpace = drv.AvailableFreeSpace
                totsiz = totsiz / 1024
                totsiz = (totsiz / 1024)+1
                totsiz = (totsiz / 1024)+1
                freeSpace = freeSpace / 1024
                freeSpace = (freeSpace / 1024) + 1
                freeSpace = (freeSpace / 1024) + 1
                MessageBox.Show(totsiz.ToString)
                MessageBox.Show(freeSpace.ToString)
            End If
        Next
Give me some logic to get the freespace as well as total size for a server..