Paths for files with a custom field present

I have most of my collection under control with Beets now, but one thing I previously have had that I’d like to retain is a “Collections” folder, separate from Compilations, for large series of Compilations (I collected Mastercuts and Streetsounds compilations in the 90s, for example). So I’ve figured out I can add a new field for those like this:

beet modify collection="Now That’s What I Call Music!" album:"Now That’s What I Call Music"

with the intention that I can do something like:

collection::^.+: Collections/$collection/$album%aunique{} [$year]/$track $title - $artist

to file them for me.

Except it doesn’t work. Is there a less tricky way to match on “exists and has a value” in the path specification?

Slightly related: Is there a way to exactly match an album title? For the “Now That’s What I Call Music!” series, all but the first two releases have a number after (the second had II). The very first one has an incorrect release date in MusicBrainz. How can I select that album to use “beet modify” and correct it?

Cool idea! I think this should work—in fact, collection::. should work as the query. To figure out what’s going wrong, l recommend debugging using beet list first:

$ beet list collection::.

to make sure this matches what you want. Then, if it does, focus on the ordering in your path configurations, etc., to make sure the appropriate entry matches the right music.

Perhaps a path query would work? You can select music based on which directory it lives in. Or include the year as part of your query.

1 Like

Aaah, thanks again Adrian. It was the order that was tripping me up. Also, the simpler . works fine, and is a little easier to read :slight_smile:

I will give the pathname match a shot.

1 Like