How to clean up these file names with brackets

Bulk Rename Utility How-To's

How to clean up these file names with brackets

Postby sinistertaco » Tue Nov 19, 2024 2:52 am

Hello! I'm new to the program and trying to do a sanity check. Here is an example list of files and what I'm trying to do.

[Anime Time] Boku no Hero Academia - S07E04 (EP 142) [1080p][HEVC 10bit x265][AAC][Multi Sub].mkv
[Breeze] Tsukimichi -Moonlit Fantasy- S02E21 [1080p AV1][multisub].mkv
Banished.from.the.Heros.Party.I.Decided.to.Live.a.Quiet.Life.in.the.Countryside.S01E01.1080p.BluRay.10-Bit.Dual-Audio.FLAC5.1.x265-YURASUKA

What I want them to look like are

Boku no Hero Academia - S07E04.mkv
Tsukimichi - Moonlit Fantasy S02EP21.mkv
Banished from the Heros Party I decided to Live a Quiet Life in the Countryside S01E01.mkv

If possible I'm trying to mass update all my files to look like the examples I provided. Getting rid of the [] with text in between would be sufficient enough if I had to take concessions. Thank you in advance..
sinistertaco
 
Posts: 2
Joined: Tue Nov 19, 2024 2:37 am

Re: How to clean up these file names with brackets

Postby Admin » Tue Nov 19, 2024 7:40 am

Hi, it can be done with RegEx (1)

Enable the Simple flag in Regex (1)

For the first two name:

Match: %1] %2 [%3
Replace: %2

This removes text between [ ] at start and end.

The third one you would replace . with space.
Then to truncate. Is it always keep all before the video resolution, eg .1080p. ?
Admin
Site Admin
 
Posts: 2673
Joined: Tue Mar 08, 2005 8:39 pm

Re: How to clean up these file names with brackets

Postby sinistertaco » Tue Nov 19, 2024 3:17 pm

Admin wrote:Hi, it can be done with RegEx (1)

Enable the Simple flag in Regex (1)

For the first two name:

Match: %1] %2 [%3
Replace: %2

This removes text between [ ] at start and end.

The third one you would replace . with space.
Then to truncate. Is it always keep all before the video resolution, eg .1080p. ?


So doing that changes a lot of files, which is great. It doesn't change all of them though. Here is an example of another file in that folder and what it looks like following your steps.
[Asakura] Tensei Shitara Slime Datta Ken 3rd Season-10 [1080p] [213ECC85]

What I'm hoping to accomplish is to rename every file in this folder to look like my wanted examples. The easiest way I can think of to make it close would be removing brackets and everything in brackets. I might be asking for too much though.
sinistertaco
 
Posts: 2
Joined: Tue Nov 19, 2024 2:37 am

Re: How to clean up these file names with brackets

Postby therube » Tue Nov 19, 2024 6:04 pm

If you want to remove anything, anywhere, within [brackets]...

3:Replace

Code: Select all
Replace:  [*]
With:  <leave empty>

5:Remove, enable Trim


Code: Select all
[Asakura] Tensei Shitara Slime Datta Ken 3rd Season-10 [1080p] [213ECC85]
->   Tensei Shitara Slime Datta Ken 3rd Season-10



Banished... doesn't seem to meet any criteria ?
therube
 
Posts: 1397
Joined: Mon Jan 18, 2016 6:23 pm


Return to How-To