Hi,
I'm creating a web app that will allow users to upload images to a directory on the server. What I'd like to do (to prevent having 5000 files in one directory) is to set a limit on how many files can go in one directory and once that limit is reached create a new directory and start storing files there.
Does that make sense? So once directory A has, lets say, 300 files in it ... directory B will be created and so on.
Is there anyway to get the file count without iterating through each file in the directory? That could be kind of slow. I don't see many options outside of that though.
Any suggestions or does anyone have a better idea on how to accomplish this altogether? I'm certainly open to ideas.
Many Thanks,
- Vb Rookie