473,320 Members | 1,600 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

equivalent to GetDiskFreeSpace

Hi,
I found an equivalent to the API Function GetDiskFreeSpace on this page:
http://msdn.microsoft.com/library/en...ystemfunctions

But I can't get it to work... in fact, I don't know where the Free Space
is... I got across all the properties and none gives the freespace nor the
used space or the disk capacity... I must be missing something...

Can anyone help plz?
Nov 22 '05 #1
1 1924
ok, I found it. Here is the code
Dim o As ManagementObject

o = New ManagementObject("Win32_LogicalDisk.DeviceID=""C:" "")

Console.Write("Free space on C is : {0}", o.Properties("FreeSpace").Value)

Console.ReadLine()

Thanks

"ThunderMusic" <NO*******@sympatico.caSPAMATALL> a écrit dans le message de
news:Od**************@TK2MSFTNGP14.phx.gbl...
Hi,
I found an equivalent to the API Function GetDiskFreeSpace on this page: http://msdn.microsoft.com/library/en...ystemfunctions
But I can't get it to work... in fact, I don't know where the Free Space
is... I got across all the properties and none gives the freespace nor the used space or the disk capacity... I must be missing something...

Can anyone help plz?

Nov 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: John | last post by:
Is there an equivalent of COM on Linux that I can get through Python. My need is to have some sort of language independent component framework. I can think of CORBA but I have to have a server...
2
by: Michael Foord | last post by:
Please pardon my ignorance on this one - but I'm not certain how the sign bt is treated in python bitwise operators. I've trying to convert a javascript DES encryption routine into python. ...
3
by: Robert Dodier | last post by:
Hello, Here's a thought that I'm sure has already occurred to someone else, I just can't find any record of it yet. An XML document is just a more verbose and clumsy representation of an...
1
by: Vannela | last post by:
Is there any equivalent control in .NET for the Power builder DataWindow control? I am explaining the Datawindow architecture to some extent. Power Builder DataWindow Control has got different...
7
by: Tim Conner | last post by:
Hi, I am an ex-delphi programmer, and I having a real hard time with the following simple code (example ): Which is the equivalent to the following code ? var chars : PChar; sBack, s :...
10
by: karch | last post by:
How would this C# contruct be represented in C++/CLI? Or is it even possible? PolicyLevel level = (enumerator->Current) as PolicyLevel; Thanks, Karch
9
by: Alan Silver | last post by:
Hello, I'm converting some old VB6 code to use with ASP.NET and have come unstuck with the Asc() function. This was used in the old VB6 code to convert a character to its ASCII numeric...
4
by: Xavier Valdés | last post by:
Hi all, I wanted to catch freespace of a net resource (i.e. \\pc\resource) but without having >2GB problem... Anyone knows how to do that? In VB6 we had LARGE_INTEGER type to use with...
1
by: ThunderMusic | last post by:
Hi, I found an equivalent to the API Function GetDiskFreeSpace on this page: http://msdn.microsoft.com/library/en-us/dndotnet/html/win32map.asp?frame=true#win32map_filesystemfunctions But I...
14
by: grid | last post by:
Hi, I have a certain situation where a particular piece of code works on a particular compiler but fails on another proprietary compiler.It seems to have been fixed but I just want to confirm if...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.