FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Thousands of Files in one Directory





Possum
Hi

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...
Recommend
Not recommend

Your thoughs and ideas please.

Thank you..
Bondings
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?
Possum
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.

Thank you..
Bondings
It doesn't make a difference if the files are stored in one directory or in several. I think there are limits in Linux for the maximum number of files for a single directory, but those limits are not easy to reach. Wink
D'Artagnan
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.
SonLight
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.
Possum
I do see the advantages of many directories, for example separation of subjects into categories..
But my CMS works best with one directroy. One advantages is if I move a topic with in a group it can keep the same URL. Which is great id it is linked to from another site.

For instance http://udopage.com/web-apps/install2132.php moved to http://udopage.com/apps/install2132.php

will break the link.

Thank you
Related topics
foobar or winamp?
password protecting a directory
Virus leftover :)
what software for all drive of usb flash disk 98se
Opera 9.0 Technology Preview 2
PHPNuke installation problem
7zip
Forbidden
Problem Uninstalling
83% bandwidth used, tho low visitor rate
Windows 7 Official Thread
Firefox/LAN problem
How Big Should an XP partition Be
Nice htaccess trick for disallowing downloading
Reinstall windows easily?
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.