I think to make this package suitable for inclusion in the main package repository it must at least only remove folders that contain only . files.
It would actually be easier in Jim because the box has libraries that automatically determine the media root (different on the HD model).
The key point is that when it thinks a folder is eligible it removes the . files and then removes the folder. If in the meantime something has appeared in there then the subsequent rmdir call will fail (non empty directory error).
I can't think you would want flatten and tidy-folders installed together. They seem mutually exclusive to my mind.
It may not surprise you to find I have another extension called "auto-flags" which adds .autodecrypt and .autoshrink to any folders the machine creates automatically as a result of Series Link recordings!
Oh, I see. So somebody with a dedicated folder they use to drop stuff into for shrinking will just have to remake it every time or not use tidy-folders. What's so wrong with using the recycle bin anyway? I'm not talking about what you might do or what I might do, but what would make it most useful to the wider community.
humax# opkg install <removed>