use strict; use Win32::AdminMisc; use Win32::NetResource; my $drive; my $free; my $total; my $unc; my $low = "1000"; my @netdrv = Win32::AdminMisc::GetDrives( DRIVE_REMOTE ); my $VERSION = 1.0; print "The drives bellow have less than 1 GB free:\n\n"; foreach $drive (@netdrv) { ($total, $free) = Win32::AdminMisc::GetDriveSpace($drive); Win32::NetResource::GetUNCName( $unc, $drive ); $free = $free / 1048576; if ($free < $low) { print "$unc is mapped to $drive drive has $free MB free\n\n"; } } =head1 NAME netspace - This script grabs a list of all the network drives your wor +kstation is connected to and prints out how much space is left on the + drive if it is less than 1 GB. =head1 DESCRIPTION This program is useful for quickly getting a list of drives low on spa +ce. =head1 README This program is useful for quickly getting a list of drives low on spa +ce. =head1 PREREQUISITES This script has a few requirements. You will need the Win32::AdminMis +c and Win32::NetResource modules. =head1 COREQUISITES None =pod OSNAMES MSWin32 =pod SCRIPT CATEGORIES Win32/Utilities =cut

In reply to netspace.pl by ergowolf

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.