Selvakumar has asked for the wisdom of the Perl Monks concerning the following question:
Hi All,
I am using the below code to find the size of the folder. But i have lot of folders and it's taking more time. Any other method to achieve the same. i tried to install win32::Dirsize but it's not installing properlt thru ppm.
use File::Find; my $size; find(sub{ -f and ( $size += -s ) }, $data ); $size = sprintf("%.02f",$size / 1024 / 1024); if ($size > 2048) { print "Directory $data contains $size MB\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: folder size
by cdarke (Prior) on Apr 19, 2010 at 11:30 UTC | |
|
Re: folder size
by Marshall (Canon) on Apr 19, 2010 at 13:16 UTC | |
by Anonymous Monk on Apr 19, 2010 at 19:26 UTC | |
|
Re: folder size
by Khen1950fx (Canon) on Apr 19, 2010 at 20:54 UTC | |
|
Re: folder size
by Discipulus (Canon) on Apr 20, 2010 at 09:09 UTC | |
by Anonymous Monk on Jul 18, 2010 at 11:54 UTC | |
by Anonymous Monk on Jul 18, 2010 at 12:08 UTC |