Perl Monk, Perl Meditation | |
PerlMonks |
Re: getting filesize in windowsby thinker (Parson) |
on Aug 23, 2003 at 10:06 UTC ( [id://286038]=note: print w/replies, xml ) | Need Help?? |
Hi peamasii, Here is a one liner that will look at all the files under your current directory, and sum the sizes of all files ending in mp3 (or Mp3 or MP3 etc) The quotes may need changing for Window's though. I have no means of checking here, but it should be ok to insert into a script perl -MFile::Find -le 'find ( sub { $s+= -s if /mp3$/i }, "." );print "size $s"'cheers thinker
In Section
Seekers of Perl Wisdom
|
|