Remove everything after the movie name (year)

Bulk Rename Utility How-To's

Remove everything after the movie name (year)

Postby uaeproz » Tue Jan 18, 2022 10:13 am

Hello guys,

I have around 1000 movie files and I would like to remove everything after the date in bracket in the folder name and subfolder files. But I need to keep the end of the subtitle language indicator to remain. Example:

Folders and movie files
From:
/movies/Enola Holmes (2020) - 5.1ch – 2.5GB - WEBRip – RARBG - 1080p/Enola Holmes (2020) - 5.1ch – 2.5GB - WEBRip – RARBG - 1080p.mp4

To:
/movies/Enola Holmes (2020)/Enola Holmes (2020).mp4

and for subtitles files:
From:
/movies/Enola Holmes (2020) - 5.1ch – 2.5GB - WEBRip – RARBG - 1080p/Enola Holmes (2020) - 5.1ch – 2.5GB - WEBRip – RARBG - 1080p.eng.srt

To:
/movies/Enola Holmes (2020)/Enola Holmes (2020).eng.srt


Many thanks,

A
uaeproz
 
Posts: 4
Joined: Sat Apr 11, 2020 2:23 pm

Remove everything after (year) in folders/files, except .srt

Postby Luuk » Tue Jan 18, 2022 12:42 pm

First to put a checkmark inside for the menu "Renaming Options, File/Folder Extensions, Rename File Extensions".
Then inside of Filters(12), to put checkmarks inside for "Files", "Folders", and "Subfolders".

If only wanting to conduct .mp4/.srt files? then RegEx(1) could use a "Match" and "Replace" like...
(.*\((19|20)\d\d\)).*?(\.([^.]+)\.srt|\.mp4)?$
\1\3

If wanting to conduct all 3-or-4 character extensions? a better "Match" and "Replace" could be like...
(.*\((19|20)\d\d\)).*?(\.([^.]+)\.srt|\.[^.]{3,4})?$
\1\3

\movies\Enola Holmes (2020)Anytext\Enola Holmes (2020)Anytext.eng.srt ==> \movies\Enola Holmes (2020)\Enola Holmes (2020).eng.srt
\movies\Enola Holmes (2020)Anytext\Enola Holmes (2020)Anytext.mp4 ====> \movies\Enola Holmes (2020)\Enola Holmes (2020).mp4
\movies\Enola Holmes (2020)Anytext\Enola Holmes (2020)Anytext.text ====> (not renamed, unless using the second regex!)

But when everything is completed, its highly recommended to remove the checkmark for renaming the file extensions.
This can be a very dangerous setting, if the checkmark does get saved for later!
Luuk
 
Posts: 691
Joined: Fri Feb 21, 2020 10:58 pm


Return to How-To


cron