# Copying music by file type

**URL:** https://discourse.beets.io/t/copying-music-by-file-type/1872
**Category:** Help
**Created:** [September 19, 2021, 3:21pm UTC](https://discourse.beets.io/t/copying-music-by-file-type/1872 "2021-09-19T15:21:38Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![apastuszak](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@apastuszak](https://discourse.beets.io/u/apastuszak)
#### Post date: [September 19, 2021, 3:21pm UTC](https://discourse.beets.io/t/copying-music-by-file-type/1872/1 "2021-09-19T15:21:38Z")

</div>

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:

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

```

---

<div class="post-metadata">

### Author: ![jackwilsdon](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/jackwilsdon/32/10_2.png) [@jackwilsdon](https://discourse.beets.io/u/jackwilsdon)
#### Post date: [September 19, 2021, 4:21pm UTC](https://discourse.beets.io/t/copying-music-by-file-type/1872/2 "2021-09-19T16:21:10Z")

</div>

I think adding `$format` to your [`paths` configuration](https://beets.readthedocs.io/en/stable/reference/config.html#path-format-configuration) should work.

---

<div class="post-metadata">

### Author: ![apastuszak](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@apastuszak](https://discourse.beets.io/u/apastuszak)
#### Post date: [September 19, 2021, 5:11pm UTC](https://discourse.beets.io/t/copying-music-by-file-type/1872/3 "2021-09-19T17:11:10Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![jackwilsdon](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/jackwilsdon/32/10_2.png) [@jackwilsdon](https://discourse.beets.io/u/jackwilsdon)
#### Post date: [September 19, 2021, 5:15pm UTC](https://discourse.beets.io/t/copying-music-by-file-type/1872/4 "2021-09-19T17:15:26Z")

</div>

> [@apastuszak](#):
>
> Now, to figure out how to resort everything without reimporting it all.

[`beet move` should take care of that for you](https://beets.readthedocs.io/en/v1.5.0/faq.html#rename-my-files-according-to-a-new-path-format-configuration)

---

<div class="post-metadata">

### Author: ![apastuszak](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@apastuszak](https://discourse.beets.io/u/apastuszak)
#### Post date: [September 19, 2021, 6:39pm UTC](https://discourse.beets.io/t/copying-music-by-file-type/1872/5 "2021-09-19T18:39:04Z")

</div>

You are just incredibly helpful. Thank you!

---

<div class="post-metadata">

### Author: ![apastuszak](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@apastuszak](https://discourse.beets.io/u/apastuszak)
#### Post date: [September 24, 2021, 2:47am UTC](https://discourse.beets.io/t/copying-music-by-file-type/1872/6 "2021-09-24T02:47:42Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![jackwilsdon](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/jackwilsdon/32/10_2.png) [@jackwilsdon](https://discourse.beets.io/u/jackwilsdon)
#### Post date: [September 24, 2021, 7:58am UTC](https://discourse.beets.io/t/copying-music-by-file-type/1872/7 "2021-09-24T07:58:14Z")

</div>

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

```auto
paths:
    default: $albumartist/$album%aunique{}/$track $title
    singleton: Non-Album/$artist/$title
    comp: Compilations/$album%aunique{}/$track $title

```

---

<div class="post-metadata">

### Author: ![apastuszak](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@apastuszak](https://discourse.beets.io/u/apastuszak)
#### Post date: [September 24, 2021, 1:09pm UTC](https://discourse.beets.io/t/copying-music-by-file-type/1872/8 "2021-09-24T13:09:11Z")

</div>

```auto
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:

---

<div class="post-metadata">

### Author: ![jackwilsdon](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/jackwilsdon/32/10_2.png) [@jackwilsdon](https://discourse.beets.io/u/jackwilsdon)
#### Post date: [September 24, 2021, 1:16pm UTC](https://discourse.beets.io/t/copying-music-by-file-type/1872/9 "2021-09-24T13:16:24Z")

</div>

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

---

<div class="post-metadata">

### Author: ![apastuszak](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@apastuszak](https://discourse.beets.io/u/apastuszak)
#### Post date: [September 24, 2021, 3:22pm UTC](https://discourse.beets.io/t/copying-music-by-file-type/1872/10 "2021-09-24T15:22:18Z")

</div>

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

Thanks again for the help!
