Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple folder size calculator
Message
From
08/08/2007 12:49:03
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01246791
Message ID:
01246823
Views:
27
We have been talking it over and have about decided to use your original suggestion and provide a work-around for those clients who are unable to CREATEOBJECT("Scripting.FileSystemObject")

Thanks for your help.

>>>>I need a way to quickly determine the total size of a folder (including all files & subfolders) before attempting to copy it. If I knew the size in bytes I could subtract that from diskspace() to see if there is enough room.
>>>>I'm sure this is a common issue. Anybody have a neat solution?
>>>
>>>Try
>>>
>>>loFSO = CREATEOBJECT("Scripting.FileSystemObject")
>>>loFolder = loFSO.GetFolder('c:\test')
>>>?loFolder.Size
>>
>>That is excellent. Works great and fast. Unfortunately I am not supposed to use windows scripting. Anything from the API crowd?
>
>Looks like you asked a hard question. Apart from my original suggestion or an idea of using Filer or ADIR() with recursion I could not find anything and I made multiple searches.
>
>Nothing good so far :(
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform