Copying One Field If A Condition Has Been Met

I've been through the support pages and topics and what I am trying to do is easy if you know what you are doing. Unfortunately for me...

I am trying to copy metadata from one field to another under a specific condition.

I have two media servers with FLAC files.

When media is being loaded into one of these media servers the software built into it apparently processes the metadata and moves the field information for "Discnumber" into a field it calls "disk".

This causes the disk numbers to not show up in other media servers that use the standard "Discnumber" field.

To solve this, I would like to create a Mp3tag action that copies the metadata back from the "Disk" field to the "Discnumber" field. I would end up keeping two different fields with the same information, but both my media servers would then show disk numbers correctly and that would solve my problem.

I only need to apply the action of copying "disk" metadata to "Discnumber" if an album has two or more disks.

I must not be writing the action correctly as I can't get it to work right.

Ultimately I need a batch action so that Mp3tag scans an entire folder of albums and applies this action to all of them.

It seems like this would simple if you know what you are doing. I may not understand the syntax correctly. I appreciate any advice on accomplishing this task.

Thanks in advance.

I don't understand. I thougth the player

This would mean to me that DISCNUMBER was filled correctly before and now, after handling by the player, shows the field DISC exclusively.
This would mean to me that one could easily copy the contents of DISCNUMBER to DISC straightaway, or copy the contents of DISC to DISCNUMBER as DISC is a copy of the former DISCNUMBER.

All this: So you either copy DISCNUMBER to DISC or if DISCNUBMER does not exist (any more), keep DISC
Action of the type "Format value" for DISC
Format string: $if2(%discnumber%,%disk%)
And straightaway another action of the type "Format value" for DISCNUMBER
Format string: $if2(%disk%,%discnumber%)

That is correct.
It works fine to copy one field to another.

I was trying to avoid copying fields if not really needed. I have a huge library and I am sure I have many 1-disk albums that have useless discnumber metadata for 1 disk. I don't really want to copy that information.

What I didn't understand is how to copy the discnumber metadata field only if a disk had 2 or more disks. In that case I would want to copy the disk number metadata for all disks in an album - 1,2,3 etc.

I hope that is clearer.

I mean: if you know by now that a discnumber like 1/1 is not desirable, then I would filter for these files and delete the field and never fill it with 1/1 again. So you would only have to deal with the sins from the past.

You filter for such files with
%discnumber% HAS 1/1 OR %disk% HAS 1/1
Then select the resulting files
open the extended tags dialogue (alt-t)
delete the fields DISCNUMBER and DISK.
For all future files the suggested mechanism should work.

Thank you very much. That is clear and is a good idea.

That leads to my next question: There are too many files to load into the Mp3Tag browser at one time. Is there a way to apply an action to all the folders and files in one folder location? Specifically, is there a way I can apply "Format value" for DISCNUMBER across all files in a particular folder as a batch process? $if2(%disk%,%discnumber%)

How many files are “too many” for this to work? I have almost 24k files and mp3tag can manage them all. But of course you will want to use a filter to only action the files you wish to modify.

Thanks. It is over 161k songs.

The computer I am working with is only 32-bit. The program crashes and I think with a 32-bit system it's too much memory. For this reason, I was trying not to load everything all at once.

One option is to load and process the many subfolders one at a time. I am hoping to avoid that and learn some better way.


See what the library function can do for you. I had more than 200k of files loaded into MP3tag and it works.

You can d&d folders and files from the explorer into MP3tag. MP3tag then treats all the selected files.

Load the folder, select the files, apply the action. That's it.

I see. Thank you for making this very clear.