Site hosted by Angelfire.com: Build your free website today!

MS-DOS External Commands

The SORT Command

Description:

Sorts input and writes results to the screen, a file, or another device.

Command Syntax:

SORT [/R] [/+n] < [drive1:][path1]filename1 [> [drive2:][path2]filename2] [command |] SORT [/R] [/+n] [> [drive2:][path2]filename2]

Explanation of Syntax:

[/R] reverses the sort order; that is, sorts Z to A, then 9 to 0.
[/+n] sorts the file according to characters in column n.
[[drive1:][path1]filename1] specifies a file to be sorted.
[[drive2:][path2]filename2] specifies a file where the sorted input is to be stored.
[command] specifies a command whose output is to be sorted.

Command Use:

This command can be used at the command prompt and in batch files.