InfoDisk() function
- Last UpdatedJul 22, 2024
- 1 minute read
Returns either the total or free space on a local or network disk drive.
Syntax
result = InfoDisk (drive, infotype, trigger);
Parameters
drive
The drive letter for which you want to retrieve information. Only the first character of a string is used. A literal string value, message tagname, string expression.
infotype
Specifies the information type. A literal integer value, integer tagname, or integer expression with following possible values:
1 - function returns total size of disk drive (in bytes)
2 - function returns free space of disk drive (in bytes)
3 - function returns total size of disk drive (in kilobytes)
4 - function returns free space of disk drive (in kilobytes)
trigger
A tagname (or expression) that acts as a trigger to recalculate the disk information. If the trigger value changes the disk information is recalculated. A discrete or analog taname, or a discrete or analog expression.
Remarks
The trigger tag only has meaning when the InfoDisk() function is used in an animation display link. If this function is used in a script, you can specify any literal numeric value, analog tagname, or numeric expression.
Example(s)
Use this script in an animation display link to show the free space of disk drive C and update the information every minute.
InfoDisk("C", 4, $Minute)