Page 1 of 1

Recursive Folders

Posted: Wed Jun 21, 2006 8:37 am
by jestaji
hi all,

i wonder how you can make a recursive folder.. ie, i want to create a folder on the server as someone uploads a file. imagining i have a main folder to which the files are uploaded..

i would wish to insert some conditions like if the count of the files reaches some limit (say 100) it should create a sub folder inside and transfer the remaining uploads to that sub-folder and so on..

in pure programing means i would say i mean to create a recursive folder.. I tried creating folders but recursion seems bit tuf.. it really counts the base folder hard....

Inviting brilliance & help to the destined abode to solve this chunk of code../

:)

Destiny of the hunk !!!!!

feyd | what's with people bolding and coloring entire posts today?

Posted: Wed Jun 21, 2006 9:38 am
by feyd
Why not have a folder which already has many subfolders which in tern have many more subfolders already so you can push the file into the correct slot without having to build a directory tree or figure out if you need to go deeper?

For instance, if you hashed the filename you could take the first character and second character as the folder and subfolder, respectively, that you dump the file into.