Sorting in an action

My mp3 directories contain filenames consisting of two leading digits in increasing order followed by a blank and further text in alphabetical order.

To properly integrate a new file (or several) into the directory - its file name has not yet a leading number and no blank - I delete '\d\d ' of all files in the directory, then sort the files acording to the text and finally renumber them again. I do this by a group of 'actions' with the exception of the alphabetical sorting.

How can I code the sorting in an action?


To simplify my question I post a minimal example:
Given is a directory containing


The non alphabetical order is a result of a previous action.

How can I get the files into an alphabetical order by an action?


In each run of actions, the sequence of files stays the same. You would have to reorder the files in a separate (perhaps even manual) step and then start the next action(s) on the new order.
The same applies to filters.

Thanks ohrenkino!
I had taken it for granted that there is a sorting function which can act on selected filenames - comparable to the numbering function. So I must continue my manual way.

The Mp3tag concept is that Mp3tag always knows only the data of the current file. So, it is not possible to compare data from the previous file or the next file with the current file.
This also means that Mp3tag cannot judge whether a file should swap places with another file.

All actions are always carried out on the current file. And then follows the next file and the actions start all over again.

Now I understand the restriction. Thanks again.