I use shared hosting and my host puts a limit on the number of files/folders per directory at 1024. If I go over am in violation of their Service Agreement and face possible suspension. The problem is that a plugin I use with my Zen Cart site caches files in a bunch of directories and due to the large number of product images/categories in my cart will eventually exceed 1024 files per directory unless I regularly clean out or delete the cache folders.
I would like to set something up that takes care of this for me automatically. Want to know if I can have all the files in particular folders automatically purged when the number of files per folder reaches 1000, and if so how would I go about it.
If that is not possible (or practical for a newbie to do on their own) would like to know how to set up something that will either delete all the files in each folder on a bi-weekly/monthly basis, or just delete the folders entirely. I assume I would use the Cron Job Manager in my host's Control Panel for this but have never used it before, would like to know what the command I would use would look like.
Have been told that answer is to simply switch to a host that does not limit the number of files allowed in a directory. I agree with that but am looking for a solution I can use now.
Thanks, Ed
Bookmarks