Since the number of directories is now running into the hundreds, it's no longer feasible to create all of them at once without causing inconvenience for the user, since 90% of those directories will go unused per user anyways. So, I've removed the buildtree function entirely, instead building in a couple of lines into the main cleandesk function that will create the necessary directories only when the respective file type is encountered. This will ensure that no empty directories are created.
Since the number of directories is now running into the hundreds, it's no longer feasible to create all of them at once without causing inconvenience for the user, since 90% of those directories will go unused per user anyways. So, I've removed the buildtree function entirely, instead building in a couple of lines into the main cleandesk function that will create the necessary directories only when the respective file type is encountered. This will ensure that no empty directories are created.