Goes through all of your /site/assets/files/ directories and removes those that have no files in them.
Clean empty file directories for ProcessWire pagesSummary
Goes through all of your /site/assets/files/ directories and removes those that have no files in them.
Pages with file/image fields require a directory, so you should expect that some of the removed directories will be re-created by these pages.
How to install
Install the same way you would any other module
- Copy PageCleanEmptyDirs.module to /site/modules/
- Go to Admin > Modules > Check for new modules
- Click install for this module, under the "Page" section and titled "Clean Empty Page File Dirs".
- Click the checkbox in this module's config screen and submit.
Install and use modules at your own risk. Always have a site and database backup before installing new modules.