So, for each artist, where relevant, I have created a folder containing all singles released formatted as such:
Field:
_DIRECTORY
Format string:
$num(%year%,4) - %album%
If there are multiple singles with varying year, and I run my Action to format string, I can't figure out which year value it converts to. It seems random amongst the songs selected.
But I always want the format string to output the most recent year from the tags on the selected files.
Is there a way to do this?
So far I've manually picked the most recent song and just run the action again.
But this way it'll take forever to format my entire music library folders.
If I run my current action most of the "singles albums" will get the wrong year value.
Hmm, just tried with a folder containing 6 songs from different years (2019, 2019, 2020, 2022, 2023, 2024).
If I sort by Year (most recent to oldest --> most recent at the top) and run the command multiple times it'll change between 2024 and 2023 reliably it seems.
So for my case it's still too unreliable to format my entire library at once.
Yes, I could reproduce that if you execute out that action several times.
I tried Convert>tag-Tag for _DIRECTORY with
Format string: $if($less($regexp(%_directory%,.* (\d+),$1),%year%),%album% - %year%,%_directory%)
and a sorted list where the youngest year (2024) was at the top and it reproduceably took that year, in this case 2024.
Thanks a bunch! This doesn't even seem to be necessary to sort. It'll automatically pick the most recent year regardless of sorting in ascending or descending order.
I'm not great at this, so it took me a couple of tries. But here's the method for others:
Actions --> Actions --> New --> Pick a name for the action --> New --> Format Value --> Field: _DIRECTORY --> Format string: $if($less($regexp(%_directory%,.* (\d+),$1),%year%),%album% - %year%,%_directory%)
Just stumbled upon an entire album where the year of all songs are formatted as follows:
"2022-10-14".
With your format string the directory changes name to "Darkbloom - 2022-10-14".
I have no idea why the %album% and %year% changed place. And neither why it's including month and date. I only need the year.