Copying music by file type

Is there a way to have beets automatically copy music on import into different directories based on file type?

So, for example, can we get a structure like this:

music
|
|-flac
   |
   |-artists
      |
      |-album
|-mp3
   |
   |-artist
      |
      |-album

I think adding $format to your paths configuration should work.

3 Likes

It did!

I really need to read the documentation before I post simple questions like this.

Now, to figure out how to resort everything without reimporting it all.

1 Like

beet move should take care of that for you

3 Likes

You are just incredibly helpful. Thank you!

1 Like

So, doing this procedure, I learned that I have some APE files I will need to convert.

What’s interesting is that the top level folders now are:

AAC
APE
Compilations
FLAC
MP3

I’m surious why Compilations is being picked up as format? Is this expected behavior or a bug I should report?

What is your current paths configuration? There are separate options for normal tracks, singletons and compilations:

paths:
    default: $albumartist/$album%aunique{}/$track $title
    singleton: Non-Album/$artist/$title
    comp: Compilations/$album%aunique{}/$track $title
1 Like
paths:
    default: $format/$albumartist/$album %if{%aunique{},($year - $label)}/%if{$multidisc,$disc-    }$track $title

I ony have default set.

I assume I should set one for comp: and singleton:

Yep, those will fall back to the default configuration values if not set.

1 Like

Ok, when this beet move is done, I will configure them and do another beet move.

Thanks again for the help!