java calculate the size of a folder code example Example: directory size java FileUtils.sizeOfDirectory(File file); //apache commons-io