Program for file sorting