Need help moving parts of a file around

Bulk Rename Utility How-To's

Need help moving parts of a file around

Postby gameboymaster01 » Sun Jul 26, 2020 4:47 am

Let's say I have 2000 files, but only 30 of them end in this string ", The" and I want to select those specific files in BRU and remove that endstring and instead insert "The " at the beginning of the filename. Keep in mind all 2000 files have different character and part lengths. For example "Chicken Pot Pie, The" and "Story of How I Ate Food, The", but they are all mixed up with other files like "Yummy Things in the fridge" and "2000 Recipes to eat". Thanks for any help! :)
gameboymaster01
 
Posts: 2
Joined: Sun Jul 26, 2020 4:43 am

Re: Need help moving parts of a file around

Postby therube » Sun Jul 26, 2020 12:44 pm

1:RegEx
Code: Select all
Match: (.*)(,\s)(The)$
Replace:  The \1


Match everything
up to an ending sequence of {comma}{space}{The}

Keep the first match
prefixed by {The}{space}
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: Need help moving parts of a file around

Postby gameboymaster01 » Wed Jul 29, 2020 5:36 am

Awesome! Thank you so much! It worked perfectly! :)

I guess one other thing I had a question on is what if the string ", The" is in the middle of the file? An example would be "Story of Pie, The - Cherry Flavors" and I want it to read "The Story of Pie - Cherry Flavors" and I have multiple filenames like that. Any help would be greatly appreciated! :)
gameboymaster01
 
Posts: 2
Joined: Sun Jul 26, 2020 4:43 am


Return to How-To