Skip to content

Instantly share code, notes, and snippets.

@avenet
Last active August 29, 2015 13:58
Show Gist options
  • Save avenet/10387698 to your computer and use it in GitHub Desktop.
Save avenet/10387698 to your computer and use it in GitHub Desktop.
Dim freeSpace
Dim boundarySpace
Set objWMIService = GetObject("winmgmts:")
Set objLogicalDisk = objWMIService.Get("Win32_LogicalDisk.DeviceID='c:'")
freeSpace = Round(objLogicalDisk.Freespace/1048576)
boundarySpace = 5120
Wscript.Echo "Free space (in MB): " & freeSpace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment