12/18/2015 - Hello! We're excited to announce that Mental Works Computing Software will soon be featuring

12/11/2015 - We're going to announce Dr.Batcher 3.0 Alpha with batch files debugger support soon. If you want to start...

News history...


Rob van der Woude:
"Mental Works Computing Software has created a nice tool for...

Andrew Jaritsyn:
“I used to write batch files with the help of Notepad, but...

Steve H.:
“This tool helped me to write some batch files in a couple...



Sorts line-by-line the input data.


SORT [/r] [/+N] [/m Kilobytes] [/l Locale] [/rec Characters] [[Drive1:][Path1]FileName1] [/t [Drive2:][Path2]] [/o [Drive3:][Path3]FileName3]

/r – reverses sort order.

/+N – starts the comparison from Nth character position.

/m Kilobytes – limit memory for sorting for some maximal amount in Kilobytes.

/l Locale – overrides default system locale for sorting non-Latin characters.

/rec Characters – limits maximal amount of characters per line in input (Characters should be integer number from 160 to 65535, 4096 by default).

[Drive1:][Path1]FileName1 – the file to be sorted.

/t [Drive2:][Path2] – directory for SORT command data that exceeds the limited amount of memory.

/o [Drive3:][Path3]FileName3 – output file for the sorted data.


SORT command performs case-insensitive sorting.

If you do not specify input or output file(s), SORT command will take data from standard input and write it to standard output.

If you specify /+ option, all lines shorter than specified N will be collated before ‘long’ lines.


Sort lines from ToSort.txt and display them on screen:

SORT ToSort.txt


Subscribe batch files programming newsletter (no spam):