|Purpose:||Monitor free disk space|
|Format:||DISKMONITOR [/C [disk]]|
DISKMONITOR [/=] disk size command
|disk||Disk drive to monitor|
|size||Minimum free disk space|
|command||Command to execute when condition is triggered|
If the free disk space for the drive drops below the specified size, DISKMONITOR will execute the specified command. For example, to send an email when the C: drive has less than 2Gb free:
DISKMONITOR C: 2Gb sendmail email@example.com "Disk Status" Drive C: is full!
The drive can also be a sharename. The size format is the same as that used for size ranges (i.e., either a number or a number with an appended k, K, m, M, g, G, t, or T).
The command line will be parsed and expanded before DISKMONITOR is executed, so if you want to pass redirection characters or variables to command you will need to protect them (by enclosing in single back quotes, doubling the %'s, or using command grouping).
If the last argument on the line is a single (, it is interpreted as the beginning of a command group. DISKMONITOR will append the following lines (in a batch file) or prompt you for more input (at the command line) until it gets a closing ).
If you don't enter any arguments, DISKMONITOR will display the disk drives it is currently monitoring.
DISKMONITOR will poll the drives it is monitoring once every 10 seconds.
|/=||Display the DISKMONITOR command dialog to help you set the command line options. The /= option can be anywhere on the line; additional options will set the appropriate fields in the command dialog.|