Due to the nature of the content Content management system I am designing I need to have 1000s of files in one directroy.
Is this normal...
Your thoughs and ideas please.
It depends on how many thousands of files. It's not really recommended since it creates a lot of resource consumption during indexing and backups. Of course it depends on the number of files and the reason for them. Is it used for caching?
All the files are my images and php pages that were already on my site in many different directories. There will be no real change to the actual number of files on my site. Except I need then in just one directory now.
if you can alter the upload script, you could separated the files alphabetically in folders, or by date / month ...
i had a couple of client that wanted several thousand files stored in their websites (thumbnails , mostly, but also pictures from a local newspaper). and i separated alphabetically which worked fine.
When practical, I think it is best to separate files into different directories by category. If not, then you should consider dividing them in a somewhat arbitrary way, perhaps by date or alphabetically or a hash of the file name. Just make sure it is easy to figure out what directory a given file is in, and keep in mind that some searches will require looking in all directories.
Although it is possible to put a huge number of files in one directory, I would recommend dividing them in some fashion if there are more than a couple of thousand files. Surely if there are ten thousand or more files in one directory, there will be times when it will introduce a large amount of overhead.