Hi I want to get the size of the folder & also display the size of the sub folders too.Is there any simpler way to do so?I have an idea of adding the files present in the current sub-directory,display it as the size of that directory ,then add it with the size of the parent directory & display that as the size of the parent directory.Please suggest me if u have some better idea,also tell me how to manage the list of directories & sub-directories of a drive,since they exist in large numbers. Happy middling with java. Netharam.
posted 14 years ago
u r thinking the right way.... don't waste your time searching for short-cuts... you have to load a directory then list it and sum the size of each file it contains...