rename batch by pattern

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
hjbjrg
Level 1
Level 1
Posts: 1
Joined: Sat May 21, 2022 5:50 am

rename batch by pattern

Post by hjbjrg »

Hi.

I have a bunch of files that are named something like this:

xxxxxxxx - name1-name2 name3 - name4 name5.mp3.

(for instance
XC145724 - Red-breasted Flycatcher - Ficedula parva.mp3 and
XC28809 - Eastern Rock Nuthatch - Sitta tephronota.mp3)

and I would like to have them all changed to this

name1-name2 name3 - name4 name5-xxxxxxxx.mp3.

Red-breasted Flycatcher - Ficedula parva-XC145724.mp3 and
Eastern Rock Nuthatch - Sitta tephronota-XC28809.mp3)



how to do??

thanx.

best regards
niels
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
xenopeek
Level 25
Level 25
Posts: 29612
Joined: Wed Jul 06, 2011 3:58 am

Re: rename batch by pattern

Post by xenopeek »

If you're using Linux Mint 20.3 Cinnamon, open your file manager, select all the files you want to rename then right-click and select Rename from the context menu. That opens them in Bulky, the rename tool. There:
- tick the box Regular expression on the right
- then set Find to: (.*) - (.*) - (.*)
- and Replace to: \2 - \3-\1

That looks to do what you want:
Image
Image
The_Mystic
Level 1
Level 1
Posts: 17
Joined: Wed Jan 02, 2019 6:30 pm

Re: rename batch by pattern

Post by The_Mystic »

I just now googled how to batch rename, and this thread was one of the first hits I got.

Mint 20.3 MATE also has this tool. I needed to add the .jpeg file extension to a bunch of photos. After a little trial & error, it worked perfectly.
Locked

Return to “Software & Applications”