Wildcards

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

Wildcards

Postby bobbyjohnson » Tue Mar 28, 2023 12:32 pm

I have a number of filenames that are all much like the below.

29.emiliaaaa - 340 - #fyp.mp4
29.emiliaaaa - 15432 - #fyp.mp4
29.emiliaaaa - 54367 - #fyp.mp4
29.emiliaaaa - 1234566 - #fyp.mp4
29.emiliaaaa - 999 - #fyp.mp4

I want to replace each of the below with a single space " "

" - 340 - "
" - 15432 - "
" - 54367 - "
" - 1234566 - "
" - 999 - "

Much thanks for your help.

ps - bonus points if this can be run against all files including subfolders.
bobbyjohnson
 
Posts: 3
Joined: Tue Mar 28, 2023 12:25 pm

Re: Wildcards

Postby therube » Tue Mar 28, 2023 4:19 pm

Single space, where?

Code: Select all
29.emiliaaaa -340- #fyp.mp4
29.emiliaaaa- 340 -#fyp.mp4
29.emiliaaaa - 340-#fyp.mp4


Or some other way ?
therube
 
Posts: 1319
Joined: Mon Jan 18, 2016 6:23 pm

Re: Wildcards

Postby bobbyjohnson » Wed Mar 29, 2023 2:47 am

Goal is to replace the <SPACE><DASH><SPACE>340<SPACE><DASH><SPACE> with only a single <SPACE>.

29.emiliaaaa - 340 - #fyp.mp4
29.emiliaaaa - 15432 - #fyp.mp4
29.emiliaaaa - 54367 - #fyp.mp4
29.emiliaaaa - 1234566 - #fyp.mp4
29.emiliaaaa - 999 - #fyp.mp4

would then become:

29.emiliaaaa #fyp.mp4
29.emiliaaaa #fyp.mp4
29.emiliaaaa #fyp.mp4
29.emiliaaaa #fyp.mp4
29.emiliaaaa #fyp.mp4

Don't worry, there is actually additional text within the filename I chose to leave out for the sake of shortness, so they won't actually end up all being the same filename after the file rename operation.

Again, bonus points if this can also work for those files in subfolders.

(To explain: I chose poorly in my file naming convention and want to "remove" that mistake.
bobbyjohnson
 
Posts: 3
Joined: Tue Mar 28, 2023 12:25 pm

Re: Wildcards

Postby Luuk » Thu Mar 30, 2023 3:07 am

Greetings bobbyjohnson..
The Filters(12) needs a checkmark inside for "Subfolders" to conduct the sub-folders.
Then Regex(1) needs a checkmark for "v2", so then a "Match" and "Replace" like...
( - \d{3,7} - )/g
\x20

You can really just type a <Space> instead of \x20 (the forum software forbids lines having only 1-space).
The \d{3,7} says "3-thru-7 digits" in the middle like in your samples, but \d+ will say "1-or-more digits".
Remember its replacing those text-strings inside of all files, but you can add groups to be more selective.
Luuk
 
Posts: 706
Joined: Fri Feb 21, 2020 10:58 pm

Re: Wildcards

Postby bobbyjohnson » Fri Mar 31, 2023 4:44 am

Worked!!! Thanks so much!!! ;)
bobbyjohnson
 
Posts: 3
Joined: Tue Mar 28, 2023 12:25 pm


Return to BRU Support