free disk space
This example shows how to display the free disk space, wmi and C#
using System;
using System.Management;
class DiskSpace
{
public static void Main (string[] argv)
{
ManagementObject disk = new ManagementObject("win32_logicaldisk.deviceid=\"c:\"");
disk.Get();
Console.WriteLine("Logical Disk Size = " + disk["Size"] + " bytes");
Console.WriteLine("Logical Disk FreeSpace = " + disk["FreeSpace"]+ " bytes");
}
}
Related posts:
- free disk space, wmi version free disk space, wmi version with C Sharp using System;using...
- Disk drive info Set objWMIService = GetObject(”winmgmts:”) Set objLogicalDisk = objWMIService.Get(”Win32_LogicalDisk.DeviceID=’c:’”) Wscript.Echo “Total...
- Get disk info using VBScript and the FSO Get disk info using VBScript and the FSO Set objFso...
- bytes to whatever Function SetBytes(Bytes) As String On Error GoTo errorhandler If Bytes...
- find the hostname for a known IP address find the hostname for a known IP address with C...
Related posts brought to you by Yet Another Related Posts Plugin.






















