Please tell me.
How I can change (replace) the file names with the following mask:
Albumartist, if it is empty then the Artist, but if it is Compilaton then Various Artist \ Album \ Track Number - Title

ABBA\Waterloo\07 - Honey, Honey.mp3
Various Artist\Romantic Collection Vol 5\01 - Besame Mucho.mp3

why do you only set the albumartist in the filename and not first in the file. then you do not have the trouble to deal with two cases.
Second: how do you know, it is a compilation.
And if you know it: then the same applies: set the albumartist first and then manipulate the filename.

I wrote the wrong time!

How can I change massively (thousands) and automatically change (replace) the folder (path, directory) names with the following mask:
Albumartist, if it is empty then the Artist, but if it is Compilaton (or Albumartist is Various Artist) then Compilaton \ Album \ Track Number - Title
Or a simplified version of the:
Artist, but if it is Compilaton => Compilaton \ Album \ Track Number - Title

C:\My Music...\ABBA - 1974 - Waterloo\07 - Honey, Honey.mp3 =>
C:\My Music...\ABBA\Waterloo\07 - Honey, Honey.mp3
C:\My Music...\Romantic Collection Vol 5\01 - Besame Mucho.mp3 =>
C:\My Music...\Compilation\Romantic Collection Vol 5\01 - Besame Mucho.mp3

I.e. on the same principle as does the organization of the iTunes media library.

The general advice stays the same: first get your tags right and then manipulate the filename / foldername.

Looking at your screendump I think, you you should per haps consider to create a column that shows the ALBUMARTIST (btw. iTunes works better if you have that field filled).

So: filter all the albums that are compilations with the filter
then Select all and either enter "Various Artist" as ALBUMARTIST or "Compilation" straight away if that is the preferred term.

To copy all Artists to the Albumartist, set a filter
Create an action of the type "Format value" for ALBUMARTIST and the format string %artist%.

If you want to do these 2 steps in one go and you are sure that all compilations have the field COMPILATION set then create an action of the type "FOrmat value" for ALBUMARTIST and this format string:

$if($eql(%compilation%,1),Various Artists,%artist%)

Then use an action of the type "Format value" for _directory and enter the full qualified path, e.g.
C:\My Music...\%albumartist%\%album%\

Or, if you still insist on only manipulating the folder name:
Use an action of the type "Format value" for _directory and enter the full qualified path, e.g.
C:\My Music...
$if($eql(%compilation%,1),Various Artists,%artist%)\%album%

Thank You.


Not at all.
The problem is: if you have files for several destination folders in a single folder, you have to move them.
If all files are already in the correct folder STRUCTURE only the folders are not NAMED correctyl, you can rename the folders.

To move the files you can format the value of the pseudo-field _FILENAME
To rename a folder you can format the value of the pseudo_field _DIRECTORY.

As you see these are two different variables/Fields, so there can be no universal action.

I have some problems with this method of renaming the folder:

  1. If a wide range of performers (artists) files in one folder, then

a) rename all the files they are all in a single folder, which is named after the first file masks
:sunglasses: The renaming just one highlight file again all are placed in a single folder which was named after the highlighted file masks. Also, an unmarked!
2) When was involved with the album and the disks and typing mask "D: \ Format_wav \% artist% \% album% [\ CD %discnumber%]", then
a) If the disc was not, then everything is set up correctly (disc number is not visible).
:sunglasses: If you have wheels, then Folder is created only with the first file recorded on the disc number.
c) If you had files with the disk number of the names, it is incomprehensible things.
3) If you had any other folder (not music) files or folder, then they are moved incomprehensible.

How all this could be sorted and connect one - universal mask?
$if($eql(%compilation%,1),Various Artists,%artist%)\%album% + [\ CD %discnumber%] + different folder ?

I maybe make clear ...

All files and Tags are correct and will not be renamed
However, they would immediately place the mask of emerging folder:
C:.......\Compilaton or Artist \ Album \ Others (and if you have a discnumber, then \ CDdiscnumber)

Or me from the hand to create folder with any name something wrong and they correctly aligned files. Then the mask should be renamed from the beginning all the folder without discnumber,
followed by another mask all the folder containing discnumber?
(Artist\Album\CD x)

as i said:
you have to have the structure first, then do the naming.
Or in short: do not use the format value action for _DIRECTORY but for _FILENAME.
You have to use a fully qualified filename (with path and all the bits of the filename).
You will be left with an empty source folder.

Formatting _DIRECTORY means that the first file in a folder determines where all other files in that folder will end up (as you rename the folder but not the files in it).

What do I miss about the problem?

All My files (without exception) have been named after the mask:
"%track% - %artist% - (%album% _ CD %discnumber%) -%year%".

And if you want to move these files to a new folder ...
create an action of the type "Format value" for _FILENAME
Enter as format string ... the complete path plus the filename definition, e.g.

D:\Format_wav\%artist%\%album%[\ CD discnumber%]\%track% -%artist% - (%album% _ CD %discnumber%) - %year%

This will create a new folder structure.

D:\Format_wav\%artist%[%year% - ]%album%[\CD %discnumber%]\%track% - %artist% - (%album% _ CD %discnumber%) - %year%
works perfectly - create the necessary file structure. Only action can not be written
"$num(%track%,2) - it will only be stored as a% track%! How to get around this?

It may be here I can already incorporated:
"D:\Format_wav..." + "$if($eql(%compilation%,1),Various Artists,%artist%)" +
"[%year% - ]%album%[\CD %discnumber%]\%track% - %artist% - (%album% _ CD %discnumber%) - %year%"?

Please take care that you do not have a blank between the % and the variable name (I found this in your examples a couple of times)
The expression
$num(%track%,2) should create two-digit-tracknumbers.
$num(% track%,2) will create an error.

I am not sure, what you want to tell me about the second example. Naturally, you can do the same thing for compilations as long as you format _FILENAME.

If you want to RENAME the FOLDER then enter only the path and leave out all the bits that define the filename.

I write with google translator because my English is very poor. That's google put extra spaces, and what was actually recorded incorrectly in the action! Thank you.
This item works perfectly with Artist Albums.
D:\Format_wav\%artist%[%year% - ]%album%[\CD %discnumber%]$num(%track%,2) - %artist% - %title% - (%album% _ CD%discnumber%) - %year%
But still I would like to have all compilatons be immediately separated from the artist albums. Compilation in metadata I have marked with logical "1" .
Can I combine these
D:\Format_wav\%artist%[%year% - ]%album%[\CD %discnumber%]$num(%track%,2) - %artist% - %title% - (%album% _ CD%discnumber%) - %year%
the same (one) format string post?

This entry
D:\Format_wav$if($eql(%compilation%,1),Compilation,%artist%)[%year% - ]%album%[\CD %discnumber%]$num(%track%,2) - %artist% - %title% - (%album% _ CD%discnumber%) - %year%
ideally take over what I needed! In a single operation is organized my entire Mediatek.
Thank You very much!

Another question with the same.
How can I rename (format _FILENAME) the track numbers only file names from A1, A2, A3, B1, B2 to 01, 02, 03, 04, 05, but without changing the track numbering in a tags?

This action "$num(%track%,2)" A1, A2, ... renaming to 00, 00, ...

If you only want to rename the files of one album at the time you could use the variable %_counter% instead of %track%.
This counts from 1 to the end of the list.

Or if you do not insist on a list of ascending numbers in sequence but only on ascending numbers you could transform the A or the B into a number.
$ord('A') (or $ord($left(%track%,1)) return 65 - the codenumber for the letter. For B it would be 66.
You can now subtrack 65 to set the A side to 0 and the B side to 1 so you end up with
01 for A1 and
11 for B1

Alternatively you copy all the existing track numbers into a user-defined field TEMP_TRACK, renumber TRACK with the track number wizard, rename the files and then copy the original track number from TEMP_TRACK back to TRACK...

I have several hundred albums. Is it possible to automatically (without distinguishing which are the tracks 1, 2, 3, ..., which are the tracks A1, A2, ... B1, B2, ...) to change the file name to 01 -%title% 02 -%title%, ... 09 -%title% ...
I.e. to rename all the files and record this action mask (Format value "_FILENAME": D:\Format_wav$if($eql(%compilation%,1),Compilation,%artist%)[%year% - ]%album%[\CD %discnumber%]$num(%track%,2) - %artist% - %title% - (%album% _ CD%discnumber%) - %year%) without the use of any sorting or pre-treatment.

The program does not rank the sequential files:
Watch the attachment