Add ".en" to every .srt file that doesn't already have it

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

Add ".en" to every .srt file that doesn't already have it

Postby Clay » Tue Dec 04, 2018 3:35 pm

I'm struggling with how to do this -

I've got a number of .srt files which are not tagged with a .en

So what I want to do is match all files that end with .srt and do not have .en - and for those, insert a .en at the end of the filename, leaving the .srt extension.

Any recommendations that don't require using the conditions option?

Thanks
Clay
 
Posts: 1
Joined: Tue Dec 04, 2018 3:19 am

Re: Add ".en" to every .srt file that doesn't already have it

Postby therube » Tue Dec 04, 2018 8:17 pm

(Not quite sure of the format of your .srt's, but...)

Everything.

Search for (I'm going to use .7z with .exe before it as an example, but substitute .srt with .en for your case...):
Code: Select all
ext:exe.7z   ext:7z

That says to find files with a .7z extension AND files with a .exe.7z "extension".
(That's actually the same as leaving out the latter part, ext:7z.)

But you can also:

Code: Select all
!ext:exe.7z   ext:7z

And that says to find files with a .7z extension AND NOT those files that end in .exe.7z.

So, the first search finds:
Code: Select all
123VIEW.EXE.7z
2GIF.EXE.7z
7z1512.exe.7z
7z1604.exe.7z
7z1805.exe.7z
ACD_CFG.EXE.7z
AVIEWNC4.EXE.7z
DBVIEW.EXE.7z


And the second search finds:

Code: Select all
BASIS.TEMP.7z
curl-7.57.0-win32-mingw.7z
ffmpeg-2.1-win32-shared (avcodec-55.dll).7z
FhGaacenc_3507.7z

That is .7z files without .exe.7z.


Do similar with your .srt, so search for:
Code: Select all
!ext:en.srt  ext:srt

(Adjust as the case may be on your end.)

Should find:
14 Degrees - A Paranormal Documentary.srt
But not:
AMD Heatsink Removal & Re-Use - section4-high.en.srt


Anyhow, once the files are found (which should be all .srt without .en), drag them from Everything into BRU (it may take a couple drags as BRU is quirky with drags) & rename those files to add the .en in there.
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm


Return to BRU Support