set dirs list first and files behind directories