#1 : 23/05-18 00:44 Cyno01
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. |
#2 : 23/05-18 09:52 Mark
Posts: 175
|
Reply to #1:
For example, see https://www.advancedrenamer.com/forum_thread?for 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 Take 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 ". Then \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. |