Index | Notes | Examples
FIND | SORT | MORE | Batch


Reads input, sorts data, and writes the results to the screen, a file, or another device. SORT acts as a filter, reading characters in a specified column and rearranging them in ascending or descending order. Syntax SORT [/R] [/+n] [<] [drive1:][path1]filename1 [> [drive2:][path2]filename2] [command |] SORT [/R] [/+n] [> [drive2:][path2]filename2] Parameters [drive1:][path1]filename1 Specifies the location and name of the file whose data you want to sort. [drive2:][path2]filename2 Specifies the location and name of a file in which the sorted output is to be stored. command Specifies a command whose output is the data you want to sort. Switches /R Reverses the order of the sorting operation; that is, sorts from Z to A, and then from 9 to 0. /+n Sorts the file according to the character in column n. If you do not use this switch, the SORT command sorts data according to the characters in column 1. Related Command For information about displaying information one screen at a time, see the <MORE> command.
-Top- | Notes | Examples FIND | SORT | MORE | Batch