You can enable DiskState for scripting to return TRUE or FALSE depending on the local volume's free space by the command line. Start DiskState with the argument "/HasVolFree". Example:
The <driveletter> is one letter A-Z and specifies which local volume to check. And the <percent> indicates the amount of free space necessary to return TRUE given by a decimal percent value.
A real world example would be:
C:\Program Files (x64)\DiskState.exe /HasVolFree d:20
It checks drive D:\. If this volume contains 20 % or more free disk space,
DiskState returns TRUE. Otherwise, DiskState returns FALSE. Note that
TRUE has the value of zero (0).
This way, you can make facilitate DiskState from Python and Perl with login scripts and such. The system("...") is useful to accomplish this task.
For instance:
C:\Program Files (x64)\DiskState.exe /SpaceView:E
This will open up the DiskState analysis window on drive E:\.
Want Vista behavior under XP?
Use the /customuser:myname1 where "myname1" is a unique identifier for the
location of the Clean.ini file etc.