how to both delete & add data only to specific files?

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

how to both delete & add data only to specific files?

Postby nefrina » Sat Feb 01, 2020 12:19 am

i'm trying to figure out how to change thousands of files where the following characters exist ", the" (and remove them) and then also add "the " as a prefix to that file.

e.g, changing this: "movie, the [1995]", to "the movie [1995]".

i can easily run the replace command and delete the ", the" portion from all of these files but i can't figure out how to simultaneously add "the " to the prefix of those affected files.

thank you in advance if you know how and can share with me, much appreciated!
nefrina
 
Posts: 2
Joined: Sat Feb 01, 2020 12:15 am

Re: how to both delete & add data only to specific files?

Postby therube » Sat Feb 01, 2020 1:14 am

7:Add
Code: Select all
The<sp>

Note that that would affect all selected files, irregardless of them having ", the" in their names.



Another method (without using what you have already done):

1:RegEx
Code: Select all
Match:  (.*?)(, [Tt][Hh][Ee] )(.*)
Replace:  The \1 \3

Find anything, find ", the ", find everything else.
Prefix with, The, then the anything part, then everything else (& excluding ", the ").



For finding files, there is nothing better then Everything Search:
Code: Select all
", the "

And in particular if they are strewn about.
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: how to both delete & add data only to specific files?

Postby nefrina » Sat Feb 01, 2020 1:43 am

that worked, thank you so much!
nefrina
 
Posts: 2
Joined: Sat Feb 01, 2020 12:15 am


Return to BRU Support