Dos command: sort


command Description
sort < unsorted.txt > list.txt Use the file unsorted.txt as input to sort.
Output from sort is sent to the file list.txt.
dir | sort Pipe output from dir to sort.
Output from sort is sent to standard output screen.
dir | sort > c:\dir\list.txt Output from sort is sent to the file c:\dir\list.txt.
dir | sort | more Output from sort is piped to more, more (a filter) delivers output one screenfull at a time.