There is a script at the Roth site (same place U get Win32::AdminMisc)
called diskpig.pl that I think is exactly what U are looking for. If U are
going to be doing alot of Win32 Admin stuff, it would be to your advantage
to learn Win32::AdminMisc. It can do so many things and the interface is
pretty easy to learn. 
http://www.roth.net/perl/scripts/

> -----Original Message-----
> From: Chris Hedemark [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 26, 2001 1:49 PM
> To: [EMAIL PROTECTED]; Aaron Petry
> Subject: Re: Checking Free Disk Space in Win32
> 
> 
> # 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?
> >
> 
> 
> 

Reply via email to