Based on your script, I can arrange them in any order, by doing this:
PHP Code:
$find=array("_","0","1","2","3","4","5","6","7","8","9");
$replace=array(" "," "," "," "," "," "," "," "," "," "," ");
and then naming the folders like this:
0899_Folder_I_want_first
0900_Second_folder
0901_3rd_folder
I know it's a newbie thing but it works like a charm!
PS: i've also removed the code for the trailing directories, cos i didn't want that and they looked ugly with all the numbers