Be careful when sorting the list. Even if the list is sorted, the files are not written to the file in the same order. They are still in their natural order. My advice is to only use sorting if you are browsing a file to find out what is in it, and don't use sorting for serious editing. If you want to sort the files and write this order to the file, see the Rewrite command.
Sorting is marvellous for finding a certain file or file type. If you are trying to find files, say with a txt extension, sort the list by extension and then scroll down to where the ts are.