Prefix based file sorter