Organize music by file extension

MUSIC / IS ORGANIZED / SOUND

The full power of bliss's declarative, rule based approach to organising music files is not always obvious. I recently showed a customer how to use bliss to organize music files by file extension. For example, how to have a root folders named as 'MP3', 'FLAC' and so on, and have albums that are encoded in each format stored within the relevant folder. I'll repeat the instructions here, because they may be of use to other users of bliss.

Why would this be useful? Well, over time your music acquisition methods change, you buy and download music from different sources, you rip music from CD and you end up with different types of music file. That may not be important to some people, but for others it can make the difference as to where a piece of music is played (e.g. high quality lossless music via a top-end hi-fi system).

Or: imagine you've converted or transcoded the file types of a number of music tracks, but all tracks in different file formats end up being stored together in the same artist/album format and you actually want them stored separately.

M&Ms Sorted by Color

The file organisation rule allows you to declare a file organisation pattern that dictates the structure and naming and of your music files and folders. This is in generic terms, for instance your pattern may say you want folders for each artist in your collection, which contain all the albums for that artist, which contain all the tracks for the album:

<album artist>/<album name>/<tracknumber>-<track name>

Those things in angled brackets are tokens. You use different tokens that use the information relating to each given file, track, artist or album. The tokens are separated by forward slashes ('/') which means everything to the left of the slash up to the previous slash or the start of the pattern is a folder. Everything else is treated as a literal which means the character is copied as-is; the literal hyphen ('-') is used to separate track number and track name. Anyway, it's the tokens that are important for now; these tokens can be placed anywhere in the file organization pattern, meaning you can organise with artists at the top level, or albums, or even track titles!

One of these tokens is <fileextension>. When used, it applies a given file's extension to the expected file path. As ever, this means if the expected file path differs to the actual file path, bliss offers to move the file (or moves it for you if "move files automatically" is chosen). You might wonder whether <fileextension> was missing from the filename in the previous example. Won't the resulting music files be missing their extension (e.g. ".mp3")? Actually, a ".<fileextension>" is always implied and inserted by bliss by default in all file organisation patterns, to make sure your files keep their extension.

How can we get the <fileextension> token working in bliss? Well, you'd use the custom file pattern option in the file organisation rule. Specifying a file organisation pattern of:

<fileextension>/<album artist>/<album name>/<tracknumber>-<track name>

... will ask bliss to check the files' current location, that they are stored under a folder determined by each music file's type (such as 'mp3'), and if not offer a fix or move the files for you.

A note on case sensitivity: bliss is case sensitive, and so on other case sensitive file systems, 'mp3' and 'MP3' will show as separate folders. Here's a UserVoice idea to give control over a token's case. Please vote for it!

Step-by-step

If this is your first time using bliss, you need to specify the location of your music library. Either type in the full file path or click the Browse button to browse through your folders. If your music is located elsewhere on your LAN, either map or mount the files or specify a UNC path.

Specify the location of your music library

Enable the file organisation rule by clicking "Organise files". The file organisation rule settings will appear.

Enable the file organisation rule

Specify your music file organisation rule. Choose 'Custom' for your Folder and file structure. The available tokens are listed for you - notice fileextension. Now specify your desired rule. Following the example above:

The <fileextension> pattern

Choose to organise files manually. If you are happy with the fixes bliss suggests, we can always change bliss to move files and folders automatically later.

Choose to move files and folders manually, for now

Apply rules. bliss now assesses each album and, if the album's files are not in the correct location, suggests a fix to move the files. Here's an example using the pattern above:

Assessment of expected and actual music file locations

Notice how bliss lists the current file path ("Actual") and what it expected it to be given the file extension pattern ("Expected"). You can see the expected location begins "mp3/".

Click the 'Fix file path' link and your file will be moved; enable automatic file movement and you can re-organise your entire music library with one click! That's a lot easier and quicker than fiddling around with Explorer or Finder!

If you are looking for more detail as to how the file organisation rule works, check out the music file organisation tutorial.

Thanks to pheezy and Mr T in DC for the images above.
tags: files walkthrough

The Music Library Management blog

Dan Gravell

I'm Dan, the founder and programmer of bliss. I write bliss to solve my own problems with my digital music collection.