Question

I have a directory structure which will contain thousands of files/directories. Now, I want to determine who much disk space is consumed by this directory structure. One of the method to determine this is by measuring disk space consumed by each file by using filelen statement and finally add them. But, I'm looking for a some better alternate. Is there any Windows API or anything else to do this?

Était-ce utile?

La solution

VB.NET has some built-in commands for doing this, but VB6 does not. In doing a search, I found vague references to an API that would do this, but no actual API name.

However, even if you find it, all you'd be doing is asking Windows to do is exactly the same thing you're avoiding. And that is to recurse through every file and add up each file size. Windows doesn't save this info, so would have to do it every time.

Probably better to just create your own function and call it when needed.

Good luck

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top