sort files according to names and place them in corresponding folders