in reply to sorting tree with folders on top

Hi,
just a quick question for clarification: You want the files of subfolders to appear directly below their folder, but not the files of the parent folder. Those you want to appear below all subfolders - right? Does that make sense to you?
Regards,
svenXY

++ for the working sample code

Replies are listed 'Best First'.
Re^2: sorting tree with folders on top
by diweooy (Novice) on Apr 07, 2009 at 10:46 UTC
    I want the files of the folder to appear just below their folder. if there are subfolders (with or without files), display these first. files have existing hash key 'file'. folders do not. this is maybe more understandable:
    A-Folder AA5-Folder | ----- AAA5-File1 | ----- AAA5-File2 BB5-Folder CC5-Folder A-File1 A-File2
    A-File1/2 are at the end of the list, because they are files. maybe this screenshot helps more: http://img212.imageshack.us/img212/3610/bildschirmfoto1u.png -> files are below subfolders