Create folders based on music tracks

Hi friends, I have a folder containing a number of tracks from different artists, I want each track to be in a folder with the same name as the file. And all tracks related to each artist should all be in the same folder. Similar to the following example:

Artist ( folder) \ title (folder) \ title.mp3 ( The file itself ) & title.flac ( The file itself )

How can this be done?

See the FAQs:

This post is the first entry that the search presents with the search words "create folders".

This can be done with this code snippet:

Go to Tag - Filename

Set Format String:

newFolder\%albumartist%\%year% - %album% ( %artist% )\%title%

thank you dear friend :pray: :pray: :four_leaf_clover: :four_leaf_clover:

If you do not want to see any surprises, I would suggest an absolute path:
D:\mymusic\%albumartist%\%year% - %album% ( %artist% )\%title%

and to get the same order of files as tracks on the album
D:\mymusic\%albumartist%\%year% - %album% (%artist%)\$num(%track%,2)_%title%
And: by adding %artist% to the album folder name, you may get several album folders if the artist varies e.g. Peter Gabriel "So" wth the track where he sings the duet with Kate Bush - the artist would be "Peter Gabriel & Kate Bush". TBH: I would leave out (%artist%)