Rearrange: Split and Reorder Filename Parts

Batchio's Rearrange rule breaks a filename into parts using a divider you choose, then rebuilds the name in whatever order you want. It is the fastest way to flip "Artist - Title" into "Title - Artist" across an entire folder, with every result shown in the live preview.

How does the Rearrange rule work?

You enter a divider and an order. Batchio splits each filename wherever the divider appears, then rebuilds it from your order string using $1 for the first part, $2 for the second, and so on.

Think of it in two steps. First, the divider decides how the name is cut into pieces. If your files look like Artist - Title, a divider of - produces two parts. Second, the order string describes the new name. Writing $2 - $1 puts the second part first and the first part second, giving Title - Artist. Any literal text you include in the order, such as spaces or a dash between the placeholders, is kept exactly as you type it.

The divider does not have to be a symbol. It can be a whole word. A file named coolmixtapetrack split on the divider mixtape becomes two parts, cool and track, which you can then reorder however you like.

Can you reorder more than two parts?

Yes. Every part gets its own placeholder in order, so $1, $2, $3 and beyond are all available. You can drop parts you do not want simply by leaving their placeholder out of the order string.

Suppose your files are structured as date_project_author and you split on the underscore. Writing the order as $3_$1_$2 reshapes every name into author_date_project in one pass. If a placeholder points to a part that does not exist for a given file, Batchio simply leaves that slot empty rather than failing, so a mixed batch stays safe.

When the goal is to move a single piece rather than fully reshuffle the name, the Range rule is often simpler, since it moves or copies one selection to a chosen spot. Range and Rearrange complement each other for structural edits.

What happens if the divider is not in a filename?

Nothing. If a file does not contain the divider, there is only one part to work with, so Batchio leaves that filename unchanged. Only files that actually contain the divider are rearranged.

This makes the Rearrange rule safe to run across a folder where only some files follow the pattern. Files that match get reordered, and everything else is left exactly as it was. You can also narrow a rule further with Smart Filters so it only touches, for example, audio files or names that contain a particular word.

As always, the two column preview shows the original name beside the rebuilt name, so you can confirm that only the intended files change before you apply.

What is a good use case for Rearrange?

Music and media libraries. If your tracks are named "Artist - Title" but your player sorts by title, flipping them to "Title - Artist" in one batch makes the whole library consistent.

The same idea applies to documents named Project - Client, exports named YYYY-MM-DD - Report, or any collection where the parts are right but the order is not. Because Rearrange is one of Batchio's composable rules, you can pair it with Change Case to normalize capitalization at the same time, or with Find & Replace to swap the separator afterward.

Everything runs in a single pass with a live preview, so restructuring hundreds of names takes seconds and never leaves you guessing about the result.

Rebuild Filenames in Any Order

Split on any divider and reorder the parts with simple $1, $2 placeholders. Batchio includes all 12 rule types free.

Download Batchio
Marcel Iseli
Marcel Iseli

Creator of Batchio · Indie App Developer

LinkedIn ↗

Marcel Iseli is an indie app developer and the creator of Batchio. He builds native macOS utilities focused on productivity and file management.