in reply to Re: hard drive space
in thread hard drive space
Here's another Win32 specific method using windows scripting FileSystemObject:
use warnings; use strict; use Win32::OLE; my $fso = Win32::OLE->CreateObject('Scripting.FileSystemObject'); my $drive = $fso->GetDrive('C:'); my $free = $drive->{FreeSpace}; my $size = $drive->{TotalSize}; printf "disk size = %d MB\n", $size/(1024*1024); printf "disk free = %d MB\n", $free/(1024*1024);
In Section
Seekers of Perl Wisdom