sreekaransrinath / file_organizer

A script that looks through any folder you tell it to and moves the files to respective subfolders based on the file type.
21 stars 20 forks source link

Removed buildtree() in favor of creating directories when necessary #40

Closed sreekaransrinath closed 5 years ago

sreekaransrinath commented 5 years ago

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.