Heres my sample code for retrieving the drivespace on a WinNT Server. Please keep in mind that
this is only a code example, and while it does work on my site, there is no warranty implied, nor do I endorse this code as being fit for merchantability for any purpose.
USE THIS CODE AT YOUR OWN RISK!
drive_space.pl
#!perl -w
# amonotod
# 15 Oct 1999
# drive_space.pl, for use on WinNT Servers
# Partly mine, partly by others...
# Thank you to the others!
use Win32::NetAdmin;
use Win32::AdminMisc;
my $Domain = 'DOMAIN';
my $Flags = SV_TYPE_DOMAIN_CTRL | 0x00008000;
my ( @Servers, @Alphabet, $Server, $UNCPath, $Count, $Date );
my ( $Total, $Free, $Used, $TotalMod, $UsedMod, $FreeMod, $Warning );
sub show_it {
open (MY_RESULT,"$my_dir/DiskSpace.txt");
$show_it_inc = 0;
while (<MY_RESULT>) {
$show_results{$show_it_inc} = "$_";
$show_it_inc++;
}
close (MY_RESULT);
}