Hi,
I use the File.copy with the wildcat *.* command to copy folders with files form a stand alone application to hard disk. Is there a way to get the folder size?
Professional Software Development Tools
Hi,
I use the File.copy with the wildcat *.* command to copy folders with files form a stand alone application to hard disk. Is there a way to get the folder size?
check the help file info (examples) about the File.GetSize action - the last example seems to be what you need.
ok - i have to browse through all the files and add the file size.
To all of you who want to calculate the folder size, please read this post in the AMS50 Forum. It should be helpful!
As I see the code in this post also enumerates all the files, gets the size of each and adds it to the sum.
BTW it just can't be otherwise, afaik there is no even Windows API call that will return the size of a folder fast, without looping through all the files.
For a folder with many files inside, getting the size takes time.
I don't know for what reason you may need to calculate a folder size.
If it's for a folder with files included in your installer, better calculate it before making the setup and include in the setup the already computed size.
Tip: AutoIT 3 has a function for this need.
Check it out here:
http://www.autoitscript.com/autoit3/...DirGetSize.htm
Intrigued