sort the results of a file scan