Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: hard drive space

by bmann (Priest)
on Oct 03, 2007 at 00:57 UTC ( #642273=note: print w/replies, xml ) Need Help??


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);

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://642273]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2016-12-10 07:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (160 votes). Check out past polls.