SpaceObServer.Application.GetFreeSpace

<< Click to Display Table of Contents >>

Navigation:  OLE Automation > Application > Methods >

SpaceObServer.Application.GetFreeSpace

Description

Provides you the total free space in Byte of the disk where the currently selected root directory is located on.
 

Syntax

GetFreeSpace (): <64 Bit Integer>
 

Result

The free space of the disk in Bytes.

 
Example

PowerShell:

$SOS.RootDirectory = "C:\"
$NumberOfFreeBytes = $SOS.GetFreeSpace

VBS:

SOS.RootDirectory = "C:\"
NumberOfFreeBytes = SOS.GetFreeSpace

Queries the free space of the scanned local disk "C:\" and stores the value in Byte in the variable "NumberOfFreeBytes".