Put music into folders (Year x - Year y)

filenaming
picard
tagging
Tags: #<Tag:0x00007f076590fdd0> #<Tag:0x00007f076590fb28> #<Tag:0x00007f076590d8c8>

#1

Hi there,

I just started using MB and it is just a great tool. I have a ton of tracks which I never organized in any way. I really like the function of MB to automatically put the tracks in a specific order structure (eg. Artist/Year/“Artist - Title”)

But for me I want to have a different structure an I am not sure if this is possible with MB:

I have so many different artists that I dont want to have a folder for every single artist. I would like to sort my tracks by Genre and Year. And here is the problem:

I always have more than 1 year in a folder (eg. 2014-2016, 2017-2018)

Is it possible to let MB know that I want to have all Tracks from 2017 and 2018 in one folder?

My structure:

Genre/Year/ “Artist - Title”

Thanks for your help and kind regards,
Teebo


#2

I’m not sure if this is exactly what you’re after, but perhaps it will give you some ideas. This would go in the File Naming script section. Warning, this is untested code.

$noop( Set a new _genre tag with default value if %genre% is empty. )
$set(_genre,$if2(%genre%,Unknown Genre))

$noop( Create a testing tag for year. )
$set(_testYear,$left($if2(%originaldate%,%originalyear%,%date%,0000),4))

$noop( Set a new _yearRange tag based on the year )

$noop( First check for unknown year. )
$if($eq(%_testYear%,0000),$set(_yearRange,Unknown Year))

$noop( Now do specific year ranges.  Add or adjust ranges as required. )
$if($and($gt(%_testYear%,0000),$lt(%_testYear%,1960)),$set(_yearRange,-1959))
$if($and($gte(%_testYear%,1960),$lte(%_testYear%,1969)),$set(_yearRange,1960-1969))
$if($and($gte(%_testYear%,1970),$lte(%_testYear%,1979)),$set(_yearRange,1970-1979))
$if($and($gte(%_testYear%,1980),$lte(%_testYear%,1989)),$set(_yearRange,1980-1989))
$if($and($gte(%_testYear%,1990),$lte(%_testYear%,1999)),$set(_yearRange,1990-1999))
$if($and($gte(%_testYear%,2000),$lte(%_testYear%,2009)),$set(_yearRange,2000-2009))
$if($and($gte(%_testYear%,2010),$lte(%_testYear%,2013)),$set(_yearRange,2010-2013))
$if($and($gte(%_testYear%,2014),$lte(%_testYear%,2016)),$set(_yearRange,2014-2016))
$if($and($gte(%_testYear%,2017),$lte(%_testYear%,2018)),$set(_yearRange,2017-2018))
$if($and($gte(%_testYear%,2019),$lte(%_testYear%,2020)),$set(_yearRange,2019-2020))
$if($gt(%_testYear%,2020),$set(_yearRange,2020-))

$noop( Now build your naming string using the temporary tags. )
%_genre%/[%_yearRange%]/%artist% - %title%

Please let me know if I’ve misunderstood and you’re wanting something different.

EDIT: Added missing percent signs around _testYear tag when testing.