Home All Groups Group Topic Archive Search About

Finding disk space on UNC drive

Author
7 Jul 2006 6:42 PM
eric.goforth
Hello,

I'm trying to find the available disk space on a folder using VB.NET.
I tried using:

            Dim Info As New System.IO.DriveInfo(sAttachmentDir)

            Console.WriteLine("Total disk space " & Info.TotalSize)
            Console.WriteLine("Available disk space " &
Info.TotalFreeSpace)


It works well if the path is in the form "c:\mydirectory", but not when
it's in the form \\mycomputer\mydirectory.  Any idea on how to do this?

-Eric

AddThis Social Bookmark Button