Add a separator between each word of a file name?

Post any Bulk Rename Utility support requirements here. Open to all registered users.

Add a separator between each word of a file name?

Postby BradleySnotshine » Sat Sep 30, 2023 4:17 pm

I know that this is a painfully noob question, but I am completely stumped on how to put a period between each word of a file name. Any help would be much appreciated.

For example: Justified S01E01 Fire in the Hole.mkv

I would like to have this become: Justified.S01E01.Fire.in.the.Hole.mkv

I've read up on BRU and tried to use the SEP field, but nothing seems to work. I just can't put the pieces together. Sadly, this is probably just a problem of my age starting with the number 7.
BradleySnotshine
 
Posts: 1
Joined: Sat Sep 30, 2023 4:06 pm

Replace spaces with period

Postby Luuk » Sat Sep 30, 2023 9:22 pm

Using Replace(3), the "Replace" should have a space, and "With" should have a period.
If needing to replace many different separators like underscores, spaces, and hyphens...
The "Replace" could also look like... _| |-

If having separator-strings like " - " that should not be converted, can use the RegEx(1) instead.
This because its easier to say exceptions, and also replace repeating-spaces with only 1-period.
So with RegEx(1) having a checkmark for "v2", the "Match" and "Replace" can be like...
(?<! [_-]) +(?![_-] )/g
.

It replaces 1-or-more spaces with only 1-period, but not when inside of separator-strings like " - " or " _ ".
Luuk
 
Posts: 706
Joined: Fri Feb 21, 2020 10:58 pm

Re: Add a separator between each word of a file name?

Postby dec » Thu Oct 12, 2023 6:35 am

Yes. it is very very easy with Replace.

Note. as a 'wrinkle, as a technique i have used for such things for over 30 years

two different approaches to cope with 'exceptions'

1. one is to first rename exceptions to a different unique string so that it will not be changed, and then rename back after.

2. two is sort of the reverse. let it name all strings, and then, with some unique text string that is created in name, rename BACK the ones that you don't want changed.

maybe this is made-up example illustrates ...

replace space with '_'

then replace '_[' with 'space['
dec
 
Posts: 67
Joined: Thu Oct 14, 2021 6:31 am


Return to BRU Support