SpaceObServer.Application.GetTotalDiskSpace

<< Zum Inhaltsverzeichnis >>

Navigation:  OLE Automation > Application > Methods >

SpaceObServer.Application.GetTotalDiskSpace

Description

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

Syntax

GetTotalDiskSpace (): <64 Bit Integer>
 

Result

The capacity of the disk in Bytes.

 
Example

PowerShell:

$SOS.RootDirectory = "C:\"
$TotalNumberOfBytes = $SOS.GetTotalDiskSpace

VBS:

SOS.RootDirectory = "C:\"
TotalNumberOfBytes = SOS.GetTotalDiskSpace

Queries the capacity of the scanned local disk "C:\" and stores the value in Byte in the variable "TotalNumberOfBytes".

 
Remarks

This function will not return the allocated space on the disk, but the total capacity of the disk.