Moving album year from beginning to end

If you need help on how to use the program
Post Reply
Smokes
Posts: 4
Joined: 2019-05-26 06:37:09

Moving album year from beginning to end

Post by Smokes »

Hi
First I would like to say thank you for this program, I would like to try and understand it better to get the most out of it.

I have tried to fix this for myself and end back to square one. It has just about got me demented, How can I rename folders inside a folder for example a folder has several mp3 albums from 1 artist

I have
[1995] - Album 1
1997 - Album 2
[1999]- Album 3
2002 - Album 4


and would like, if possible

Album 1 1995 (with a space or - between name and year)
Album 2 1997
Album 3 1999
Album 4 2002



I have tried select folders to add; this gave contents within each folder. I have tried clicking on folders to add. In move string I have tried several combinations none of which gave me what I wanted. I know brackets could be removed with find and replace. The problem I have is moving the date to the end with a space between album name. Did I say I have 'tried' :D

Any help appreciated
Thanks
Smokes
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: Moving album year from beginning to end

Post by antp »

Hi,
For adding folders, were you able to have the in the "Files" tab in the end?
i.e. making the list of what you want to rename.
For how to rename them, in this case it is easy with regular expressions (regex)
Use this expression:

Code: Select all

\[?(\d+)\]? - (.+)
and this as new name:

Code: Select all

$2 - $1
\[ and \] indicate you want brackets, the \ in front of them is because the brackets are special characters in regex, with other meaning
the ? after them indicate that these brackets are optional
(\d+) => parenthesis indicates a group that you want to keep, \d indicates a number, + indicates you want one or more of these (numbers)
(.+) => again a group to keep, a dot indicates any character, again the + to indicate one or more.

$2 - $1 => you reuse the groups indicated by parenthesis in the expression, these groups are numbered
Smokes
Posts: 4
Joined: 2019-05-26 06:37:09

Re: Moving album year from beginning to end

Post by Smokes »

Antoine
Thank you very much for the help. I would have never been able to get anywhere near. Your reply worked great with year - xxxx This has fixed some of my folders then I came across some folders which have years with brackets at the beginning

I have had several attempts at trying to move years with [xxxx] and (xxxx) the nearest I have got is;

from (1981) - Name
to () Name - 1981



Some folders have from the beginning year
(xxxx) or (xxxx) -
[xxxx] or [xxxx] -


What would be useful, Being able to deal with below to add to the end of my folder names


hyphen with year when brackets are removed I tried the reply you gave several ways and got () at the start of folder name
space (year)
space [year]

Thanks for your help and patience.

Smokes
Last edited by Smokes on 2019-05-28 10:03:27, edited 1 time in total.
antp
Site Admin
Posts: 9651
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Re: Moving album year from beginning to end

Post by antp »

What I provided works for both styles you mentioned in your first post, i.e. :
[1995] - Album 1
1997 - Album 2
(I tested it by copy/pasting these names to create folders)

So I don't really understand the problem, or maybe something was lost between the explanation and the execution...
Can you provide screenshots of what you do?

If you also want it to work with parenthesis, you could use the following expression instead:

Code: Select all

[\[\(]?(\d+)[\]\)]? - (.+)
in this case, I put a list of wanted characters between brackets, so \[ and \(
The \ in front is because both [ and ( are special characters in regex.

Image
Smokes
Posts: 4
Joined: 2019-05-26 06:37:09

Re: Moving album year from beginning to end

Post by Smokes »

21 months later I forgot about this post. Got a notification when I logged in today. A very late thanks for the help.
Post Reply