I know how to get actual file size of a directory tree with Perl but can
anyone offer assistance in getting actual disk space required or what
windows calls "Size on Disk" of a directory tree.

Below is what I have to find actual data size of a tree but it does not
take into account wasted disk space due to cluster sizes.

use File::Find;
use File::stat;

$GS_DiskSize;

find({ wanted => \&GetDataSize}, ".");

print "Data Size: $GS_DiskSize\n";

sub GetDataSize {
        $st = stat($File::Find::name) or die "No $file: $!";
        $GS_DiskSize += $st->size;
}

Thanks,

Dax
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to