Max year of all the tracks

Hello.
I want to merge vol 1, vol 2... directories.

I want to include the latest year in the directory name in case vol 1, vol2... year is different.

So is there a way I can find the max year of the selected tracks?

Thanks a lot.

As Mp3tag does not compare data of 2 or more files I doubt that there is a way to find a maximum or minimum way than to sort by the year field and treat the found values manually.

OK thanks for your help nevertheless.
But can I store previous file's year in a variable and replace with newer if its larger? Or is it exactly what you mean that mp3tag doesn't do? Thanks again.

I doubt that this is possible as you say

MP3tag only knows the properties of the current file - and not those of the previous or the next file.
You may use an export script ... but writing that and getting the data back in probably takes just as long as doing it manually.

Here is a thread that does some calculation over several files - perhaps you can get something out of that export script: