There's no other way then recursively looping over all
sub-directories/files.
And if you used some tool to do it before, it too would have done the same
thing.

But it shouldn't be that painful really - One method, with a File object as
the argument, looping over the listFiles array, IF directory then
recurse-call and add the result ELSE add the fileSize

/Max


On Mon, May 12, 2008 at 1:05 PM, Steve Onnis <[EMAIL PROTECTED]> wrote:

>
>
> I was using the Scripting.FileSystemObject to get file sizes and folder
> sizes for one of my applications but now I am running on a 64 bit system
> and
> the Scripting.FileSystemObject is a 32 bit application so I cant use it
> now.
>
>
> For files I am using the java.io.File class to get the file sizes but have
> hit a wall when trying to get folder sizes.  I have looked at the
> java.io.File class does not have a length() method that works on folders to
> get the folder sizes.  It seems the only way to do it is to loop over the
> listFiles() array and add the file sizes up and then manually recurse
> through any directories that might be in there.  Seems like a bit of a pain
> really.
>
> Anyone got any better ideas?  I have had a look at the .NET classes also
> and
> it seems the same thing is there, no more Size property of the Directory.
>
> Steve
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to