Set a tag based on differences in per-track information

I have an issue where some classical albums have a single composer, and some have a composer per track, or composer per work.

For file naming purposes (tree hierarchy), I would like to use Composer as the top of the tree if the album is a single composer (such as a recording of Vivaldi’s 4 Seasons). However, if the recording has multiple composers, I would like to set the top level of the tree to the Album Artist or Orchestra. Is there a way to write a re-naming script where the top level changes based on the existence of more than one composer across all tracks?


Maybe this topic about different file naming patterns for multi artist releases helps you as for classical albums the composer is set as the track artist.