Rename : Move Brackets and all content

Bulk Rename Utility How-To's

Rename : Move Brackets and all content

Postby Razyel95 » Tue Nov 09, 2021 2:52 am

Hello! Hope someone can help me with this, I need to move the Brackets sections (all with numbers) to the end of the file.

EX: [3747373] My filename.mp3
EX: [454437] My filename.mp3
EX: [32893] My filename.mp3

------------------------------------------------

EX: My filename [3747373].mp3
EX: My filename [454437].mp3
EX: My filename [32893].mp3

Keep in mind the Brackets have a blank part that change to other side.
Razyel95
 
Posts: 7
Joined: Tue Nov 09, 2021 2:44 am

Move beginning [numbers] to the end

Postby Luuk » Tue Nov 09, 2021 6:22 am

For the examples, can use RegEx(1) with a Match and Replace like...
(\[\d+\]) (.+)
\2 \1
Luuk
 
Posts: 690
Joined: Fri Feb 21, 2020 10:58 pm

Re: Move Brackets and all content

Postby Admin » Tue Nov 09, 2021 11:13 am

If you are looking for maybe "easier" syntax than the standard regex syntax, in RegEx (1) enable Simple, then use :

Match : [%1] %2
Replace : %2 [%1]
Admin
Site Admin
 
Posts: 2343
Joined: Tue Mar 08, 2005 8:39 pm

Re: Move beginning [numbers] to the end

Postby Razyel95 » Tue Nov 09, 2021 5:38 pm

Luuk wrote:For the examples, can use RegEx(1) with a Match and Replace like...
(\[\d+\]) (.+)
\2 \1


Thanks! This worked perfect to me.
Razyel95
 
Posts: 7
Joined: Tue Nov 09, 2021 2:44 am

Re: Move Brackets and all content

Postby Razyel95 » Tue Nov 09, 2021 5:40 pm

Admin wrote:If you are looking for maybe "easier" syntax than the standard regex syntax, in RegEx (1) enable Simple, then use :

Match : [%1] %2
Replace : %2 [%1]


Thank you! This is amazing, simple code, lots of save time! That helped a lot!
Razyel95
 
Posts: 7
Joined: Tue Nov 09, 2021 2:44 am


Return to How-To