Switch parts of file or folder names

Advanced Renamer forum
#1 : 06/11-18 21:40
er ge
er ge
Posts: 2
My noob question: Is it possible at all to batch change file or folder names from say

Frank Zappa
Billy Joel

to

Zappa, Frank
Joel, Billy


or

Bobby Brown_Frank Zappa.mp3
Allentown - Billy Joel.mp3

to

Zappa, Frank - Bobby Brown.mp3
Joel, Billy - Allentown.mp3


06/11-18 21:40 - edited 06/11-18 21:41
#2 : 06/11-18 23:09
David Lee
David Lee
Posts: 1125
Reply to #1:

Use the Replace method and tick "Use regular expressions"

Your first problem is simple - just match two strings separated by a space and reverse, inserting <comma><space>:

Text to be replaced: (.+) (.+)
Replace with: \2, \1

The second one is a bit more complex as you have two possible separators between title and artiste - <underscore> or <space><dash><space> - but the principle is the same:

Text to be replaced: (.+)(_| - )(.+) (.+)
Replace with: \4, \3 - \1

For an introduction to regular expressions see www.advancedrenamer.com/user_guide/regular_expresions


06/11-18 23:09