Link to home
Start Free TrialLog in
Avatar of jvieira
jvieira

asked on

Getting size of directory on NT

Hello,

I'm running perl on Win NT.  I'm trying to find a way to get the size of a directory.  I know how to find the size of individual files and I could easily do that and then just add them up.  But the directories have directories within them and so on which would make things difficult.  Is there a way to just get the size of a directory?  If not is their another way to get what I want easily?

Thanks,

Joe
Avatar of maneshr
maneshr

what do mean by the "size of the directory"??

do you mean the total size of all files under that directory and all the sub directories recursively??

Avatar of jvieira

ASKER

Yes,

The total size of all files under that directory and all sub directories.

ASKER CERTIFIED SOLUTION
Avatar of maneshr
maneshr

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jvieira

ASKER


Just change this line:
$whereami=`pwd`;
To:
$whereami=`chdir`;

And it works on WinNT.

Thanks,

Joe
 
Cooollll!!

:-)