Get FolderSize
-
-
AFAIK, you get the folder size by finding the size of each file within the folder. It may be dependent on the File system in use You can use WIN32_FIND_DATA to get the file size and then sum all the individual sizes to get the folder size
Some things seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
What do you mean by folder size? Do you mean the disk space taken by the folder itself? Very small - just a list of files and some extra stuff. Do you mean the total of the size of the files in the folder? Then you start having problems with file size. NTFS for example has alternate data streams (see: http://www.heysoft.de/nt/ntfs-ads.htm[^]) Does it include the size of all the directories beneath it? Do you follow reparse points? Your question is simple, but there are lots of sub questions you need to ask, which don't have easy answers. And those answers will vary with application. There's a reason you can't find a "GetDirectorySize" function... Iain.
-
What do you mean by folder size? Do you mean the disk space taken by the folder itself? Very small - just a list of files and some extra stuff. Do you mean the total of the size of the files in the folder? Then you start having problems with file size. NTFS for example has alternate data streams (see: http://www.heysoft.de/nt/ntfs-ads.htm[^]) Does it include the size of all the directories beneath it? Do you follow reparse points? Your question is simple, but there are lots of sub questions you need to ask, which don't have easy answers. And those answers will vary with application. There's a reason you can't find a "GetDirectorySize" function... Iain.
Iain Clarke wrote:
What do you mean by folder size?
I saw like this question previous but I guess they need to total size of files,maybe.