Sort Text

<< Click to Display Table of Contents >>

Navigation:  Actions > Files and Folders >

Sort Text


This action is used to sort strings in a text or in a text file in the ascending or descending order. It is possible to assign the sorted text to a variable for further processing (e.g. in "Text Loop") or save it to a file. You can specify the source text explicitly using variables or read it from an external file.




You can select the source for the source text in this group of parameters: specify an external file or specify the text explicitly.

File Name – specify the full file name either manually or using the Open File dialog box by clicking the button to the right from the field. It is possible to use RoboTask variables.

This text – if you want to specify the text explicitly, fill the text field manually. It is possible to use variables in the text. RoboTask will replace them with variable values during the action.


Sort Mode

You can specify the string sorting mode in this group

Ascending or Descending

Case Sensitive

Remove duplicates - this allows to keep only unique lines in the text.



Select at least one of the variants (or both at once) :

Assign text to Variable – specify the name of the custom variable the sorted text will be assigned to. It is impossible to use variables.

Save text to File – specify the full file name either manually or using the Open File dialog box. It is possible to use RoboTask variables.



Allows you to add a variable to the action or triggering event that you selected. You must place the cursor in a edit box in the settings dialog window of the action or event and then click the {V} button.


note Related Topics

Copy/Move File

Rename File

Delete File

Write Text File

Search for Files

Change Folder

Create Folder

Rename Folder

Remove Folder

Synchronize Folders        

Wait for File

Unique File Name

File Attributes

File Date and Time

Empty Recycle Bin

Get File Metadata

Read Text File

Get File Hash