Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

calculate free space of C drive using vbscript

Tags:

vbscript

how can i write vbscript that calculates the free space in C: drive of a windows machine

like image 420
aks Avatar asked May 25 '10 08:05

aks


People also ask

How do I check my C drive free space?

To check the total disk space left on your Windows 10 device, select File Explorer from the taskbar, and then select This PC on the left. The available space on your drive will appear under Devices and drives.

What is the minimum C drive free disk space required?

At least 7.5 GB of free disk storage for a typical installation. 60 MB in the temporary directory space. 2 GB partition size in the C:\ drive.

How much space should be free in C drive SSD?

As you fill the SSD, to less than 10% available, it can completely thrash your performance. Also, with how SSD's move data around to balance performance with endurance, filling the drive can decrease your drive's life expectancy. For near optimal performance, ~50% available.

How do I increase free space on my C drive?

To expand system partition (C: driver) size Before expanding C drive size, need to confirm there is unallocated space next to C drive. Right click on C drive then select “Extend volume”, then follow the onscreen instruction to finish the process.


1 Answers

have a look at this page:

Set objWMIService = GetObject("winmgmts:")
Set objLogicalDisk = objWMIService.Get("Win32_LogicalDisk.DeviceID='c:'")
Wscript.Echo objLogicalDisk.FreeSpace
like image 83
king_nak Avatar answered Sep 28 '22 13:09

king_nak