Page 1 of 1

Rename-Pairs for parts of filenames?

PostPosted: Thu Jul 22, 2021 11:20 pm
by psantucc
I have a large collection of zip files with disorderly attribution of artist names, i.e. the same media might be attributed to "Cocker, Joe" in one file name and "Joe Cocker" in another.

There is a fair bit of noise surrounding these attribution names, enough that I don't think I can use a regex - some commas in the set don't denote name reversals, and many name "fields" contain extra text to serve as a content tag.

I had hoped that the file import rename-pairs would work, but it seems to only match complete filenames. I could make that work with a truly massive text file, but was hoping for a dodge that would work as if the pairs were going in the Replace box, so a line of

Cocker, Joe|Joe Cocker

would find every file with "Cocker, Joe" and exactly replace it with "Joe Cocker".

Is there such a function in BRU?

Re: Rename-Pairs for parts of filenames?

PostPosted: Fri Jul 23, 2021 12:47 am
by Luuk
The easy way is using Replace(3) with a 'Replace' and 'With' like...
Cocker, Joe
Joe Cocker

If having many different names to convert, they can be like...
Cocker, Joe|Cocker, John|Last, First|...
Joe Cocker|John Cocker|First Last|...

To only present these names, Filters(12) needs a checkmark in 'RegEx' with a Mask like... (Cocker, Joe|Cocker, John|Last, First)
Then must click the blue arrows beside "Mask" to filter all of the other filenames away.

If always having many different names to convert, its good idea to save all of the settings with "File, Save As".
So then maybe naming it something like "FixCommaNames", so its not so much typing in the future use.

Re: Rename-Pairs for parts of filenames?

PostPosted: Fri Jul 23, 2021 7:06 pm
by psantucc
Thanks! I didn't know that a delimited list was acceptable in the Rename dialogue. This will suit my need for the big renaming, and the list will be pretty easy to generate.

I think I can use a more generic Regex to obtain the list I need to operate on in the first place, but I'll ask that over in the regex forum. I never was very good with regex syntax.