Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Available space on NAS
Message
From
20/02/2014 21:25:45
 
 
To
20/02/2014 16:20:30
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01594835
Message ID:
01594852
Views:
54
>If you just want to make sure your application isn't going to run out of free space, then you really only care about the volume(s) to which you have been granted access. If these are mounted on your local computer as SMB/CIFS volumes, then they should respond to DOS, Win32 or .Net calls to get information about them. Googling I find http://msdn.microsoft.com/en-us/library/system.io.driveinfo%28v=vs.110%29.aspx?cs-save-lang=1&cs-lang=vb#code-snippet-1 . The .TotalSize, .TotalFreeSpace and (especially) .AvailableFreeSpace properties should give you what you need.

This is good if you have a map drive. Because, this requires a map letter. If you try to use \\NAS\ShareName, this will give:

"Object must be a root directory ("C:\") or a drive letter ("C")."

This is why I was not able to use that approach on the VM.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform