Returns the amount of free disk space (in bytes or specified units) on the specified disk drive.
iFree = SYS_GetFreeDiskSpace ([sDrive[,datasetsizes]])
Variable | Description |
---|---|
iFree | The number of bytes of free disk space. NUMBER. |
sDrive | Optional: The drive to check, current drive by default. STRING. |
datasetsizes |
Optional: The default is DS_BYTES; other values are DS_KILOBYTES, DS_MEGABYTES, DS_GIGABYTES, or DS_TERABYTES. The value returned for DS_BYTES is an integer. If the free space is greater than 2 gigabytes, the return will be 2 gigabytes (though in reality, the free space is greater than that). All other datasetsizes values will return a REAL of the actual disk space that is free. |
SYS_GetFreeDiskSpace is executed by the Agent process, not the Silk Test Classic process. To affect the host process, use the function with the hHost notation or machine handle operator. For more information about the machine handle operator and hHost, see Machine handle operator.
Print (SYS_GetFreeDiskSpace()) Print (SYS_GetFreeDiskSpace("D"))