From: "semut" <ant_yio A_T hotmail D_O_T on

Hello,

Beside using a CFindFile or FindFile API to read through each of the
files to get the folder size. Are there a speedy (high performance) way to
obtain the similar information. Some Win32 API may be or COM?

I notice that


fso = Dispatch("Scripting.FileSystemObject")
fldr = fso.GetFolder("C:\\WINNT")
fldr.SizeMight be able to obtain the folder size too with probably some COM
object. But, does it perform the task fast?



thanks.









From: "semut" <ant_yio A_T hotmail D_O_T on
I had tested the Scripting FileSystem object with COM, seems like it could
not cope folder that exceed double type range. Cause the folder size is
store in dblVal in the variant, when it exceed the limit, the vt become
VT_EMPTY.

BTW, the speed is not fast either.

Any idea?



"semut" <ant_yio A_T hotmail D_O_T com> wrote in message
news:utYexCybGHA.2068(a)TK2MSFTNGP02.phx.gbl...
>
> Hello,
>
> Beside using a CFindFile or FindFile API to read through each of the
> files to get the folder size. Are there a speedy (high performance) way
> to obtain the similar information. Some Win32 API may be or COM?
>
> I notice that
>
>
> fso = Dispatch("Scripting.FileSystemObject")
> fldr = fso.GetFolder("C:\\WINNT")
> fldr.SizeMight be able to obtain the folder size too with probably some
> COM object. But, does it perform the task fast?
>
>
>
> thanks.
>
>
>
>
>
>
>
>
>


From: Tim Roberts on
"semut" <ant_yio A_T hotmail D_O_T com> wrote:
>
>I had tested the Scripting FileSystem object with COM, seems like it could
>not cope folder that exceed double type range. Cause the folder size is
>store in dblVal in the variant, when it exceed the limit, the vt become
>VT_EMPTY.

Limit?? The limit of a double is 1.8 x 10^308. The largest disk I'm aware
of today is about 1 x 10^15.

>BTW, the speed is not fast either.
>
>Any idea?

There are no shortcuts for this task. You have to enumerate the
subdirectories one by one and add up the individual file sizes.
--
- Tim Roberts, timr(a)probo.com
Providenza & Boekelheide, Inc.
From: "semut" <ant_yio A_T hotmail D_O_T on
My mistake, it seems like it is not that of double bottleneck, well, as of
1.7E +/- 308 (15 digits), it is hardly get exceed.

It is the drive that i am trying to get the used size that return VT_EMPTY.
I need to use some other function for that purpose.

The function can only get used size for directory.








"Tim Roberts" <timr(a)probo.com> wrote in message
news:vrtl521a1so8o0g20h3bb80masu1sh6uvb(a)4ax.com...
> "semut" <ant_yio A_T hotmail D_O_T com> wrote:
>>
>>I had tested the Scripting FileSystem object with COM, seems like it could
>>not cope folder that exceed double type range. Cause the folder size is
>>store in dblVal in the variant, when it exceed the limit, the vt become
>>VT_EMPTY.
>
> Limit?? The limit of a double is 1.8 x 10^308. The largest disk I'm
> aware
> of today is about 1 x 10^15.
>
>>BTW, the speed is not fast either.
>>
>>Any idea?
>
> There are no shortcuts for this task. You have to enumerate the
> subdirectories one by one and add up the individual file sizes.
> --
> - Tim Roberts, timr(a)probo.com
> Providenza & Boekelheide, Inc.