#1 2009-05-09 22:04

mcmdean
Member
Registered: 2009-05-09
Posts: 9

Moving year in folder to the start

I have music folder with this format :     Title - yyyy  e.g  Concert By The Sea - 1955

I wish to rename to look like this:    yyyy - Title  e.g.  1955 - Concert By The Sea

Any help would be appreciated.

I have only used the renamer rules to rename files/folders.

Offline

#2 2009-05-09 22:22

prologician
Member
Registered: 2009-01-30
Posts: 84

Re: Moving year in folder to the start

It seems like a regular expression would handle this quite nicely.

Expression: (.*?) - (\d{4})
Replace: $2 - $1

Offline

#3 2009-05-09 23:27

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Moving year in folder to the start

Just a note for mcmdean, if you want to rename folders instead of files you will need to go to Filter Settings and check appropriate options.

Offline

#4 2009-05-10 02:01

mcmdean
Member
Registered: 2009-05-09
Posts: 9

Re: Moving year in folder to the start

Worked like a charm - Thanks Guys

Offline

#5 2009-05-10 02:08

mcmdean
Member
Registered: 2009-05-09
Posts: 9

Re: Moving year in folder to the start

If there is a period in the folder name it doesn't work.

Last edited by mcmdean (2009-05-10 02:27)

Offline

#6 2009-05-10 02:22

prologician
Member
Registered: 2009-01-30
Posts: 84

Re: Moving year in folder to the start

Well, periods also mark the file extension, so it's not much surprise that periods give problems.

It might be worth adding in filters that replace all periods with some other character (dollar or percent signs might work), do the regular expression, then replace the dollar/percent signs with periods again. It should dance around the issue well enough, I think.

Offline

#7 2009-05-10 02:29

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,440

Re: Moving year in folder to the start

All you need to do is simply unmark "Skip extension" option in the RegEx rule, this will fix your "dot" problem. Dot is treated as an extension in files and folders.

Offline

Board footer

Powered by FluxBB