Page 1 of 1

Need help moving parts of a file around

PostPosted: Sun Jul 26, 2020 4:47 am
by gameboymaster01
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! :)

Re: Need help moving parts of a file around

PostPosted: Sun Jul 26, 2020 12:44 pm
by therube
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}

Re: Need help moving parts of a file around

PostPosted: Wed Jul 29, 2020 5:36 am
by gameboymaster01
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! :)