hey->

i do it like this:

@GeometrySahara = Win32::AdminMisc::GetDriveGeometry("g:\\");

print "Sahara E Drive:\n\n";
print "Sectors per cluster: $GeometrySahara[0]\n";
print "Bytes per Sector:    $GeometrySahara[1]\n";
print "Free clusters:       $GeometrySahara[2]\n";
print "Total clusters:      $GeometrySahara[3]\n";
print "Total Drive Size:    $SaharaTotal\n";
print "Total Free Space:    $SaharaFree\n";

hope that helps
jg


-----Original Message-----
From:   Sumit [mailto:[EMAIL PROTECTED]
Sent:   Wed 10/15/2003 2:45 PM
To:     win32-admin
Cc:     
Subject:        getting remote hard drive space
Hi All,
I am using the Win32::AdminMisc module to build some inventory information within our 
network. I am trying
the GetDriveSpace function to get the size of remote hard drives. The documentation of 
the module says that
if a UNC is used instead of local drive then a backslash should be used at the end. 
Here is what I am using

$drive = "\\\\$server\\C\$\\";
{($FixedDrives{$drive}->{Size}, $FixedDrives{$drive}->{Free}) = 
Win32::AdminMisc::GetDriveSpace($drive);}

And on running this I get undefined value. Any idea whats wrong with the code or has 
anyone encountered this
before. I got the module from Jenda Krynick's ppm repository.

Also is there any way to find out the number of fixed drives on a remote machine?

Thanks in advance,
Sumit.




_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to