Disc number into Directory

Hello there, I have a number of albums which are filed as follows:

Artist>Album>Disc 01
Arist>Album>Disc 02
etc

The data is correct in the Discnumber tag.

Could someone please tell me how would I go about getting the application to move the files and rename so that they appears as follows?

Artist>Album (Disc 1)
Artist<Album (Disc 2)
etc

This would need to include copying the album art and deleting the old folders. Then I would need the album name to be updated to the same format as the directory.

Thanks.

I would do it the other way round: first rename the ALBUM, then take care of the folder name.
Yet, I wonder if renaming the ALBUM ist such a good idea: it would lead to an increase of albums although there are far fewer.
One idea to overcome this problem is to merge DISCNUMBER and TRACK, so that the information is stored in TRACK. Track 1 from disc 1 would get the number 101.
This could be achieved with an action of the type "Format value" for TRACK
Format string: %discnumber%$num(%track%,2)

If you still want to go your way:
Rename ALBUM with an action of the type "Format value" for ALBUM
Format string: %album% (Disc %discnumber%)

To move all files to a new location and delete the old one would be a renaming of the current folder.
Use an action of the type "Format value" for _DIRECTORY
Use an absolute path as format string, e.g.
Format string: d:\music\%artist%\%album%

Thank you for your help.

image

[#0]
T=4
F=DISCNUMBER
1=^(\\d+)/\\d+
2=$1
3=1

[#1]
T=5
F=ALBUM
1=%album% (Disc %discnumber%)

[#2]
T=5
F=_DIRECTORY
1=A:\\Music\\Record\\%artist%\\%album%

I am playing around with it and it seems to be working. I want to include other functionality within this but am having problems.

For example, I have an album which contains square brackets in a number of fields which I want to replace with round brackets. It seems to work fine on everything except the _DIRECTORY.

It duplicates the name of the album within a new folder, within the original album folder instead of replacing the original album folder name (ignore the disc number in directory for this one).

image

From:

To:

Ah, same principle!

image

Just out of interest:
You replace the parenthesis in ALBUM with the first action. So everything should be fine now with the contents of ALBUM
Then, in the last action, where you rename directory, you replace all the parenthesis in ALBUM again (which should not be there if everything went OK in the first action and if it didn't then why should it work now?).

I think it would be absolutely sufficient to just use a plain ALBUM and no $replace() function to rename the _DIRECTORY.

The same drama happens more or less to the _FILENAME: first you replace in TITLE and then for the filename you replace again.
Looks overly complicated to me.

That was the first thing I tried, albeit a slight variation, but then it was creating a folder within the album folder?

I have tweaked the overall code which works fine except in terms of getting the correct disc number in the directory for some reason (it updates the album name correctly).

image

[#0]
T=4
F=DISCNUMBER
1=^(\\d+)/\\d+
2=$1
3=1

[#1]
T=5
F=ALBUM
1=$replace(%ALBUM%,'[','(',']',')') (Disc %discnumber%)

[#2]
T=5
F=_DIRECTORY
1=$replace(A:\\Music\\Record\\%artist%\\%album%,'[','(',']',')')

[#3]
T=5
F=_FILENAME
1=$replace(%TRACK% %TITLE%,'[','(',']',')')

[#4]
T=5
F=TITLE
1=$replace(%TITLE%,'[','(',']',')')

Not sure where I have gone wrong.

Somewhere deep in the archives I found that it is absolutely advisable to rename a folder always in a separate action group.
The problem I see: you rename the file and the folder in the same action group.
So depending on the internal order of execution, where file system operations are somewhat special, it could be that the renaming of the file and / or the folder leads to the duplication.
Try to rename files and folders in separate actions (and leave out the $replace() if you have already replaced the whole stuff in the original fields).

Please tell me that there is a workaround for this issue rather than having to run different actions?

You have to run different action groups for this specific purpose but you can define a set of action groups that gets executed when you call the general actions: tick the action groups that belong to the current set of treatments.
You can even set the order by moving the action groups up and down in the list.

So if I go into the Action Group panel, tick the two actions, will the program remember my selections if I then click on the actions dropdown instead of going into the panel?

You call the dialogue for actions either with the toolbar button for "Actions" (not "Actions (quick)") or with Alt-6. A following <enter> or click on OK executes all the actions that got ticked.
The current selection is saved either when you click on OK in the actions dialogue or use the Utils button and save the configuration.

Thanks for that advice.

I've done what you suggested concerning two action groups but the outcome is still the same.

image

image
OR
image

Second is slight improvement as mentioned previously.

I wonder, is it a problem that all the files appear in a folder called 'A:\Music\Record\Manic Street Preachers\Generation Terrorists (Legacy Edition) (Remastered) (Disc 1)' initially?

This can best be answered by you if you try it with a different folder.

BTW: can we come back to the initial problem: renaming a folder?
The whole stuff with getting the data in the fields right should be straightforward an working.
What happens if you only rename a folder with the single format value action in the action group? Does that work?

image

It works but not as intended.

What was intended?
Adding the discnumber?
Have you updated the info in ALBUM accordingly?

image

[#0]
T=4
F=DISCNUMBER
1=^(\\d+)/\\d+
2=$1
3=1

[#1]
T=5
F=ALBUM
1=$replace(%ALBUM%,'[','(',']',')') (Disc %discnumber%)

[#2]
T=5
F=_DIRECTORY
1=A:\\Music\\Record\\%artist%\\%album%

Works when songs from same disc number are selected.

Same for all tracks from the same album:

Perhaps this was not quite clear:
renaming a folder should be a single action in an action group of its own.
renaming a file should be a single action in an action group of its own.
Updating info in real tag fields can be done with as many actions in an action group as necessary.
But handling the file system properties like filename and folder has to be separate.