# From "Perl for System Administration"
use Win32::AdminMisc;
($total,$free) = Win32::AdminMisc::GetDriveSpace("c:\\");
print "$free bytes of $total bytes free\n";
# Good luck, hope that helps!
# -Chris
----- Original Message -----
From: "Aaron Petry" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 26, 2001 1:45 PM
Subject: Checking Free Disk Space in Win32
> I've been looking for a way to check the free disk space on a drive in
> Win32 all morning. I could use a command input operator like `dir c:` and
> take the return value, but that gives me a whole file listing, and I'm not
> thrilled with breaking that up to find the "x bytes free" line. I can't
> find a switch for the dir command in Win 2k to show just the free space,
> and if I search for a file that won't be there I just get "File Not
> Found." I haven't found anything in any modules that I have, and I
thought
> that someone here would know how to get the free disk space in a nice
> way. Does anyone have any suggestions?
>