My question is, is it a bad idea to store multiple videos in one folder?
I have created a video uploader script, but it doesn’t save each video in a seperate folder, it saves all of them in one folder (each with a different hashed video name).
- videos folder
- e0d123e5f316bef78bfdf5a008837577
- 35d91262b3c3ec8841b54169588c97f7
- cc273fe9d442850fa18c31c88c823e07
Is this a bad idea? Could this lead to any problems? What are the pros and cons of this?
Yes this IS a problem once you have few thousands files in that directory. Some operating systems choke when there are that many files in one folder.
I also remember one case where a FTP server refused to show more than 4000 files in a directory listing.
One solution is to organize your files like this:
This gives you max 16 folders below videos folder. If you still end up with too many files in the sub-directory then use another level: