Add hyphen and letter, change letter after hyphen..or delete

Bulk Rename Utility How-To's

Add hyphen and letter, change letter after hyphen..or delete

Postby Ronstang » Fri Jan 20, 2023 10:23 pm

Yes, this is actually three questions in one

I know how to add a it to the end of a normal file using just the add feature but I would like to be able to add it to files like the following all at the same time:

The Blues Brothers (1980) TCMSLBM.mkv
The Blues Brothers (1980) TCMSLBM.eng.srt

So they become:

The Blues Brothers (1980) TCMSLBM-C.mkv
The Blues Brothers (1980) TCMSLBM-C.eng.srt

But I don't know how to get it at the end of the actual file name and before the language modifier so the subs actually play....and the letter will not always be the same so would I just have to modify the settings each time? Not a big deal as I can save them....not too many letters I am dealing with.

Now....I would also like to know how to change the letter after the hyphen on files that already have them, this includes the same issue of getting it to change the letter in the filename before the language modifier.

Finally, how can I remove the hyphen and letter altogether in same files?

Ok, a bonus....how can I replace the hypen and letter with the same letter in parenthesis with one space after the filename and the first parenthesis.

Sorry for all this at once but I have found the need to change a bunch of things up to my routine and I really need to be able to do all these things quickly and easily to stay organized.

Thanks
Ronstang
 
Posts: 45
Joined: Tue Feb 09, 2021 2:14 am

Re: Add hyphen and letter, change letter after hyphen..or delete

Postby therube » Mon Jan 23, 2023 5:36 pm

If you set, Renaming Options -> File/Folder -> Rename File Extensions As Being Part of File Name, & check the 'First' box, you can then:

3:Replace
Code: Select all
Replace:  .
With:  -C.

With that, ".eng.srt" is treated as the extension (rather then just, ".srt"),
& adding -C would give you what you want.

That would also assume that the filename itself did not have a (.) within it.


The letter after the hyphen would be much the same:

3:Replace
Code: Select all
Replace:  -C.
With:  -Z.



Parens:
3:Rename
Code: Select all
Replace:  -C.
With:  (C).


or, more generally.

1:RegEx, Simple
Code: Select all
Match:  %1-%2.%3
Replace:  %1 (%2).%3


Again, this can all depend on your file names themselves & whether they may have - or . within them.
therube
 
Posts: 1319
Joined: Mon Jan 18, 2016 6:23 pm

Re: Add hyphen and letter, change letter after hyphen..or delete

Postby Ronstang » Tue Jan 24, 2023 6:45 am

Thank you.....but that actually puts the "-C" or whatever letter before both periods, so once after the file name and the other after the language modifier so the file becomes:

12 Angry Men (1957) TCMNSBM-C.eng-C.srt

But....I found the solution by simply putting a check mark in the "First" box under "Replace" and then it works perfectly

Thanks
Ronstang
 
Posts: 45
Joined: Tue Feb 09, 2021 2:14 am

Re: Add hyphen and letter, change letter after hyphen..or delete

Postby Ronstang » Sun Jan 29, 2023 11:02 pm

I found another glitch using the general replace command.....it works great, Thank You....until I have a filename that has another period in it like the word "vs." then it blows up because it becomes the first period....any way around this??

Thanks
Ronstang
 
Posts: 45
Joined: Tue Feb 09, 2021 2:14 am


Return to How-To