How to get network drive size in C # (without a "card drive")

I need to get free network drive space, without a "card"

DriveInfo drvInfo = new DriveInfo("\\NetworkDrive"); 

I am trying to do this, but it is not working.

+9
c #
Jun 03 '10 at 12:05 on
source share
2 answers

I believe that you will need to call GetDiskFreeSpace (Win32 API) through P / Invoke to get free disk space on a UNC network drive.

eg.

C # GetDiskFreeSpace UNC

+9
Jun 03 '10 at 12:11
source share

You can use WMI to connect to a remote computer and display the free space for each drive.

An example can be found here.

0
Jun 03 '10 at 12:24
source share



All Articles