[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] File/Folder Iteration



At 11.05 11/22/97, Strider wrote:
>I've tried the (toolbox?) command that iterates through the directories,
>but I couldn't get it to work. If anyone has any ideas on that too, I could
>really use them.

There's the File::Find module which recurses directories.

#!perl -w
use File::Find;
my $size;
find(\&mysub,'PowerPudgeII:Desktop Folder:sock:');
sub mysub {$size += -s $File::Find::name}
print $size,"\n";

This may not give the size you want, but you get the idea.  Hope this helps,

--
Chris Nandor               pudge@pobox.com           http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])
#==                    MacPerl: Power and Ease                     ==#
#==    Publishing Date: Early 1998. http://www.ptf.com/macperl/    ==#



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch