Restructuring samples into folders