Removing fields without changing time stamp of unchanged files

I'm just cleaning my database and removing fields I never use like "Publisher", "Date", "COMMENTITUNExx", "Length" and so on.

First I tried by "mark"ing all files, right click, extended/expanded tags, deleting the "unwanted".

Worked but mp3tag changes the time stamp for all files, even the 90 % that had been clean before.

Same by using the action "Remove tag fields except..." - it works but it changes the time stamp of EVERY file, even the unchanged ones?

Is there a way of removing those fields and changing only thw time stamps of those files that got really changed?

Many thanks!

You filter for the files that have at least 1 unwanted field.
And you repeat the process until all files with unwanted fields have been treated.

Thanks, that was my idea but I don't know how to "write" this filter (Something like "files that have fields filled except track, titel, Artist...")
I tried it by showing all columns - but those are so many (30+) it makes no sense (and I have to check every time if there are new fields I didn't see before).

One method would be to go through the list of unwanted fields one by one like
publisher PRESENT
Select the displayed files, open the extended tags dialogue, there, delete all the fields that you don't want, save the changes, remove the filter, select all the files, check the extended tags dialogue and use the filter for the next field.
Once you have done that, perhaps you add a column that shows the "created at" property and you sort by that so that you have all the new files in a block.
Or: there is no filter like the "Delete field except" function.

1 Like

In such a case I suggest to have a look at the action called
"Remove fields except"
There you can define which tags you want to keep (and therefore delete all other, however they are called).

If you want to keep your embedded cover art, don't forget to include PICTURE in your list of tags to keep.

Please test such a new action with some of your files to be absolutely sure that you keep ALL your tags wanted. A backup of your data is always recommended.

Thanks, Your answer gave me two ideas:

  • to write a filter "%ARTISTS% PRESENT; %LENGTH% PRESENT; %DISCNUMBER% PRESENT; %COMMENTITUNNORM% PRESENT; %COMMENTITUNPGAP% PRESENT; %COMMENTITUNSMPB% PRESENT; %CONDUCTOR% PRESENT; %LANGUAGE% PRESENT; %PUBLISHER% PRESENT" (and so on) - this filters all those tracks that have one of those "unwanted" fields filled.

  • in a second step to use my action "Remove fields except..."

Seems to work, the only thing is I have to include EVERY possible "unwanted field" in the filter so it will grow and grow...

Additional question:
Is there a way to save this filter in mp3tag?

The better way would be to write a filter like

%% (or some wild card for any fields) except (%track%; %title%; %artist%) PRESENT -

but if I understand You right there is no way to do so? :frowning:

You might also find a filtering solution here that will work for you: List all existing tags in column except a few specified ones? - #3 by DetlevD

1 Like

There are no wildcards for field names.
I would try it with any field e.g. DATE.
If you filter for DATE then you will also find a couple of other strange fields - delete them as well or run the "Remove field except" action - the result will be the same.
After this first run you will find that probably not only the previously filtered field has vanished but also some others as well. This is esp. true if you use this method on a previously clean collection to which only a couple new files have been added.
And once the collection is clean, it should be easy to run the "Remove fields except" action on any new files. And even if you forget to do it: a look at the extended tags dialogue and a subsequent filter for an exotic field will quickly lead to the desired result.
I find it quite useful to check the extended tags dialogue prior to deleting information - deleted information is very hard to restore. So actually, I would not make to much fuzz about the initial effort. From then on it will be a smooth ride, I think.
The filter expressions are automatically saved in the filter history.
If you want to keep special filters, it is advisable to have a little text file ready where you store them. There you also add comments to describe the purpose.

I start to love this community, this gave me the hint.

I can now do it in 2 steps:

  1. Filter my library (or a directory of it) with
    NOT ("$regexp($regexp($list('~~','~~','=='),'~~(.+?)~~.+?==','$1~~'),'((ALBUM|ALBUMARTIST|ARTIST|COPYRIGHT|COMPOSER|GENRE|LYRICIST|MEDIATYPE|PICTURE|TITLE|TRACK|YEAR)~~)',)" IS "")

  2. Run my predefined action

MANY thanks!

One further question:
How can I save this filter in mp3tag (for now I copy & paste ist from a *.txt)
Is there a way to save this filter as an "action" or even to combine this 2 steps in one action or "script"?