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
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
ASKER
Yes,
The total size of all files under that directory and all sub directories.
The total size of all files under that directory and all sub directories.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Just change this line:
$whereami=`pwd`;
To:
$whereami=`chdir`;
And it works on WinNT.
Thanks,
Joe
Cooollll!!
:-)
:-)
do you mean the total size of all files under that directory and all the sub directories recursively??