Finding out total and free disk space in .NET

前端 未结 9 1193
我在风中等你
我在风中等你 2021-01-04 03:08

I am trying to find a way to determine the total and available disk space in an arbitrary folder from a .NET app. By \"total disk space\" and \"available disk space\" in a f

9条回答
  •  执念已碎
    2021-01-04 03:40

    Not C# and only gives the avilable space, but . . .

    dir \\server\share | find /i "bytes free"
    

    gets you part of the way. I'm looking or the same solution but there doesn't seem to be a nice one - especially when trying to avoid mapping drives.

提交回复
热议问题