# Sorting in different path

**URL:** <https://discourse.beets.io/t/sorting-in-different-path/2347>\
**Category:** Help\
**Created:** [May 15, 2023, 11:12am UTC](https://discourse.beets.io/t/sorting-in-different-path/2347 "2023-05-15T11:12:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![myself](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/myself/32/756_2.png) [@myself](https://discourse.beets.io/u/myself)\
**Post date:** [May 15, 2023, 11:12am UTC](https://discourse.beets.io/t/sorting-in-different-path/2347/1 "2023-05-15T11:12:52Z")

</div>

hello 🙂

I have been searching the forum and the docs for 3 nights.  
Unfortunately, I have not yet found the right answer.  
Maybe I am blind or just used the wrong keywords.

What do I have to do so that during the import (and afterwards)  
files that meet a special requirement are sorted into a different folder.

As a first example:  
Tracks that contain **energy** or **#** in the comment field  
should use a different path for saving.

Or is it better to do this after the import?

my config file  
I know that it is not according to the requirements  
but this way it be maybe more easier to understand

```auto
plugins: fetchart embedart convert scrub replaygain lastgenre chroma web the bucket
directory: /music
library: /config/musiclibrary.blb
art_filename: albumart
threaded: yes
original_date: no
per_disc_numbering: no

convert:
    auto: no
    ffmpeg: /usr/bin/ffmpeg
    opts: -ab 320k -ac 2 -ar 48000
    max_bitrate: 320
    threads: 1

#YES to basics
asciify: yes
#singletons: no

paths:
    #default: '%bucket{%upper{%left{%the{$artist},1}}}/%the{$artist} - $title'
    singleton: '%bucket{%upper{%left{%the{$artist},1}}}/%the{$artist} - $title'
    #default: '%asciify{$artist::1}/$artist - $title'
    #singleton: '%asciify{$artist::1}/$artist - $title'
    #singleton: '${artist[1]}/${artist} - ${title}'

    #unused
    lowquality: '_lowquality/%filename%'
    unknown: '_unknown/%filename%'
    ready: '_musica/%bucket{%upper{%left{%the{$artist},1}}}/%the{$artist} - $title'
    warmup: '_musicb/%bucket{%upper{%left{%the{$artist},1}}}/%the{$artist} - $title'
    #comp: Compilations/$album%aunique{}/$track - $title
    #albumtype_soundtrack: Soundtracks/$album/$track $title

import:
    write: yes
    copy: no
    move: yes
    resume: ask
    incremental: yes
    quiet_fallback: skip
    timid: no
    #filename_format: '${artist[1]}/${artist} - ${title}'
    #path: '{artist[1]}/$artist - $title'

    #rules of engagement
    rules:
    #pushback lowquality mp3 (.flac welcome)
    - match: '*.mp3'
      codec: 'mp3'
      #sometimes 319-317 bitrate
      bitrate: '..300000'
      path: lowquality
    #lost in translation
    - languages: cyrillic,persian,pashto,maghrebi
      #if no language detection:
      #regex if more than 7 times non latin character then true
      path: unknown
    #get serious
    - Field: comment contain(s) (energy and/or "#")
      path: ready

bucket:
    bucket_alpha:
    - 0-9
    - A
    - B
    - C
    - D
    - E
    - F
    - G
    - H
    - I
    - J
    - K
    - L
    - M
    - N
    - O
    - P
    - Q
    - R
    - S
    - T
    - U
    - V
    - W
    - X
    - Y
    - Z
    extrapolate: no
    bucket_alpha_regex: {}

lastgenre:
    auto: yes
    source: album

embedart:
    auto: yes

fetchart:
    auto: yes

replaygain:
    auto: no

scrub:
    auto: yes
the:
    strip: yes

replace:
    '^\.': _
    '[\x00-\x1f]': _
    '[<>:"\?\*\|]': _
    '[\xE8-\xEB]': e
    '[\xEC-\xEF]': i
    '[\xE2-\xE6]': a
    '[\xF2-\xF6]': o
    '[\xF8]': o
    '\.$': _
    '\s+$': ''

web:
    host: 0.0.0.0
    port: 8337

```

for info:  
beets on docker  
i actually use beet only in -S mode  
album tags are important but not for sorting into folders

---

<div class="post-metadata">

**Author:** ![adrian](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/adrian/32/4_2.png) [@adrian](https://discourse.beets.io/u/adrian)\
**Post date:** [May 16, 2023, 12:17pm UTC](https://discourse.beets.io/t/sorting-in-different-path/2347/2 "2023-05-16T12:17:27Z")

</div>

Hi! This is the relevant page in the docs:  
[https://beets.readthedocs.io/en/stable/reference/config.html#path-format-configuration](https://beets.readthedocs.io/en/stable/reference/config.html#path-format-configuration)

Try:

```yaml
paths:
    comments:energy: ...

```

---

<div class="post-metadata">

**Author:** ![myself](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/myself/32/756_2.png) [@myself](https://discourse.beets.io/u/myself)\
**Post date:** [May 16, 2023, 4:27pm UTC](https://discourse.beets.io/t/sorting-in-different-path/2347/3 "2023-05-16T16:27:32Z")

</div>

Thank you for your help and your time.

it works 🙂

sometimes i get the output at the beginning:  
Skipped 3 paths.

(the numbers vary)

are there supported flags for  
log: beets.txt  
like -d

---

<div class="post-metadata">

**Author:** ![jojo](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/jojo/32/709_2.png) [@jojo](https://discourse.beets.io/u/jojo)\
**Post date:** [May 19, 2023, 6:17pm UTC](https://discourse.beets.io/t/sorting-in-different-path/2347/4 "2023-05-19T18:17:25Z")

</div>

About “skipped”, could be: [Configuration — beets 1.6.0 documentation](https://beets.readthedocs.io/en/stable/reference/config.html#incremental)

or [Configuration — beets 1.6.0 documentation](https://beets.readthedocs.io/en/stable/reference/config.html#quiet)

---

<div class="post-metadata">

**Author:** ![myself](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/myself/32/756_2.png) [@myself](https://discourse.beets.io/u/myself)\
**Post date:** [May 20, 2023, 10:06am UTC](https://discourse.beets.io/t/sorting-in-different-path/2347/5 "2023-05-20T10:06:05Z")

</div>

thank you @jojo I will have a look at it
