Getting NTFS Directory structure size 
Author Message
 Getting NTFS Directory structure size

Does anyone have any idea of how to get a directory size with total
number of files in it with Perl for Win32. I am trying to replicate
the 'Properties' function under Explorer.

I want to avoid doing a File::Find and then getting the information
for each individual file in the tree.

Any suggestions will be greatly appreciated.

Victor A. Cuya

No span spoken here. To answer to my e-mail,
reverse the address above.



Sat, 03 Mar 2001 03:00:00 GMT  
 Getting NTFS Directory structure size


Quote:
> Does anyone have any idea of how to get a directory size with total
> number of files in it with Perl for Win32. I am trying to replicate
> the 'Properties' function under Explorer.

Your question is not entirely clear.. Do you want the number of files
in a directory? Do you want the number of bytes or blocks in a
directory (yes, they are different)? Do you want to recurse down into
subdirectories, and get the total size in bytes or so? I will assume
the last, even though it's not at all clear.

Quote:
> I want to avoid doing a File::Find and then getting the information
> for each individual file in the tree.

Still, that is what you will have to do. Unless NTFS has some
accounting system built in (which I doubt very very much) you will
have to recurse into your tree, and get the info for each file. Then
there are the issues about: do you want to know how large a file is,
iow how many bytes it contains, or do you want to know how much disk
space it uses?

This comes up regularly on this group, and I suggest you search
dejanews for some answers.

Quote:
> Victor A. Cuya

> No span spoken here. To answer to my e-mail, reverse the address above.

spam, I suppose?

Do you realise that your From: line contains your address, and that
that is the first place that a spam collector will look? Do you
realise that when someone responds to your post, your address will
most likely appear in the attribution line (see above)?

Martien
--
Martien Verbruggen                  |
Webmaster www.tradingpost.com.au    | You can't have everything, where would
Commercial Dynamics Pty. Ltd.       | you put it?
NSW, Australia                      |



Sat, 03 Mar 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. getting directory size

2. Getting directory size on NT

3. File::Find with Compressed NTFS directories

4. File::Find with compressed NTFS directories

5. NTFS directory traversal

6. Win32::File - Reading NTFS directories

7. size of structures?

8. Size of a hash data structure

9. Reading Directory Structure

10. Loop thru directory structure

11. ftp-upload directory structure

12. Hash function to spread files in a directory structure

 

 
Powered by phpBB® Forum Software