Folder rename - Adding space before bracket

Advanced Renamer forum
#1 : 10/12-21 22:42
4c3T
4c3T
Posts: 3
Hi. I'm brand new to this program. It does look very advanced, and I've yet to find out what it can do.
I just realized that I don't have a first clue of what to do. I'm having a slight, to put it mildly, problem with ca. 800 folders that I don't wish to rename individually.
They're folders containing movies, and once upon a time I was stupid, and set up this movie folder format in Radarr. For some reason, at the time, I found movie.title(year) appealing, but some time later I thought it looked awful, so I changed it back. Problem then was that once they were imported Radarr handled them just fine, but not when importing. This wasn't always the case. For the most part it would find them and import them just fine.

Some time later, more than a year later, it's not that lenient anymore, or I just had some bad luck when importing them after I re-arranged my disks (Got DrivePool now) and did a huuuge import. It found pretty much all movies, as it would seem. But evidentially not. Now I'm stuck with a bunch of folders that aren't matched in the database.

Radarr imports by default at Movie.Title (year)
so I need to find all these and put that extra space character in them.
From what I've seen here in the forum, it boils down to some code which is inserted somewhere. I've got some exploration to do about that part.
I've seen people asking about expressions to use and some have replied with ditto.

This is probably what I'd need, so any help in the matter would be much appreciated. Thank you.


10/12-21 22:42
#2 : 13/12-21 11:14
David Lee
David Lee
Posts: 1071
Simply to add a space before each instance of "(" you can use the Replace method...

Replace : "("
with: " ("

note: do not include the quotes.

However if some filenames already include the space then you can avoid these filenames using a Regular expression.

ie...

Replace: "[^ ]\K\("
with: " ("
Use regular expressions

See https://www.advancedrenamer.com/user_guide/regul ar_expresions

Hovever the meta-character \K is not included in this basic introduction. It is an instruction that specifies that the preceding characters (ie a space in this case) must be present but will not be included in the final match.


13/12-21 11:14
#3 : 13/12-21 22:25
4c3T
4c3T
Posts: 3
Reply to #2:

Hi. Thanks for the reply.
However, I'm not sure I understand quite how to operate this thing, but I think I managed to select "Use batch method", and that placed presets (Or I perhaps added these previously - In my defense, I exited the program while I waited for a reply).
I got something called 1 : Replace, in which I could, seemingly, input "Text to be replaced", with two entry fields, one for the text being replaced, and the other replaced with.
This is where I inputted "[^ ]\K\("
and " (".

I tried this on two folders, one already with an extra space, the other without.
It replaced both, and upon looking at "Regular expressions" (link you sent me), I can't see \K anywhere in the list, so maybe that's what's wrong? Or am I barking up the wrong tree here?


13/12-21 22:25
#4 : 14/12-21 11:23
David Lee
David Lee
Posts: 1071
Reply to #3:
Not only have you not bothered to read the documentation, clearly you haven't even read my advice properly!

1) "Use regular expressions" - that means select the option of course!

2) "\K" - I explained this meta-character and pointed out to you that it is not included in Kim's very basic introduction!


14/12-21 11:23
#5 : 15/12-21 06:01
4c3T
4c3T
Posts: 3
Reply to #4:
Sorry, I have a tendency to miss things sometimes.
To my defense, I actually have a diagnosis that sometimes comes into play. It's D.A.M.P (nowadays it goes under A.D.H.D). I've also been dealing with a couple of computers that has been malfunctioning, so my mind has been somewhat otherwise occupied, along with late nights, such as this. And I find programs such as this quite overwhelming, so that's why I reached out for a little help.

I think I got it this time though. Tried it on a few folders, and it seems to be working.
Right now I'm loading the folders, and it takes some time, but I'll leave it to it, and when I wake up, and am good & ready, I'll try it on massive scale (+8k folders).

Anyway, huge thanks for the info. I'll be back with a progress report.
Again, thanks!


15/12-21 06:01