There's more than one way to do things | |
PerlMonks |
Re: Win32 low disk-space-free, with email notificationby Kanji (Parson) |
on Jul 16, 2002 at 02:08 UTC ( [id://181981]=note: print w/replies, xml ) | Need Help?? |
my @drives=Win32::AdminMisc::GetDrives(DRIVE_FIXED); If you have any SUBSTed 'drives', GetDrives() will list those as if they were additional drives, which may or may not be what you want (I imagine it'd matter more if you had seperate alarms for each drive). I'm not familiar with Win32::AdminMisc, but I got around this using Win32::DriveInfo's VolumeInfo...
Also, what happens if you have 0 bytes free? Won't the below cause your script to skip over it? (Forgive my ignorance if GetDriveSpace() returns some sort of '0 but true' string instead...) if($total && $free){ --k.
In Section
Code Catacombs
|
|