Moving the "The" (or "A") in a file name?

Advanced Renamer forum
#1 : 23/05-18 00:44
Posts: 1
Heck of a time trying to search for a solution because adding "the" and "a" to searches doesnt work, but i have a subset of folders that are

{movies\The Title (year) (specs)\}

For ones that start with "The" id like to rename the folders to

{movies\Title, The (year) (spec)\}

How can i do this with the Title part being varying lengths? How do i tell it to move the "the" to before the first parenthesis?

Im sure this has been asked and answered a hundred times, but finding those threads is proving difficult.

23/05-18 00:44
#2 : 23/05-18 09:52
Posts: 170
Reply to #1:
For example, see um_id=5200

So, in this case, try this ....

Assuming the format is exactly as you say, The Title (year) (spec), so something like

The Title (1962) (Horror)

and the brackets are real.

Replace Method
Text to be replaced: (The )(.*)( [(].*[)])( [(].*[)])
Replace with: \2, \1\3\4
Occurrence: All
Case sensitive: Not ticked
Use regular expressions: Ticked
Apply. to: Name


Text to be replaced: (The )(.*)( [(].*[)])( [(].*[)])

This is effectively creating 4 groups; "The ", the text up to "(year)", "year", "(spec)". Note that the "( )" define the groups, and there's a space in "The ".


\2, \1\3\4

Rebuilds the name using your format. Note that the "," is purely text, the groups are the "\1" etc. You can use "A " instead of "The ", of course.

23/05-18 09:52