The Sort Text List allows you to sort a list of items or the text in a file using various algorithms in either ascending or descending order.

Text to sort - choose either a text file or enter a text list to sort
| • | File - select a text file to sort |
| • | Text List - enter a list of text to sort. If the items you want to sort are in a variable, then enter the variable (eg. %MyItems%) and make sure the Expand Variables option is checked. To sort a list of variables, turn off the Expand Variables option. |
Sort Algorithm - select the sorting algorithm to use to sort your list. Select to sort the list in ascending order or descending order.
| • | Natural Sort - sort order similar to how Windows Explorer sorts files (not case sensitive and numbers are treated as such) |
| • | ASCII sort - basic ASCII sorting (not case sensitive) |
| • | ASCII case sensitive sort - exactly that |
| • | Random - items are randomly ordered, using the Fisher-Yates shuffle (see: http://en.wikipedia.org/wiki/Knuth_shuffle) |
Output Variable
The sorted text list will be output to the selected variable. To write the items to a file, use the Write to Text File action and specify the variable name as the contents.