reconstruct the folder structures.