The WaxTax

How to sort your music library automatically

A practical guide for DJs, collectors and diggers who buy music as downloads and want one consistent folder layout without sorting by hand.

Last updated:

How can I sort my music automatically?

Use the tags that are already inside your files and a folder template. A sorter reads each file's artist, album, track number, title and genre, builds a path such as House/Artist/Album/01 Title.flac, and moves every file there in one run.

Tags are small text fields stored inside the audio file itself. MP3 files store them as ID3 tags; FLAC files store them as Vorbis comments. Because the information travels with the file, the sort works the same whether you have 50 tracks or 50,000, and you can repeat it any time with the same result.

What do I need before I start?

Which folder structure works best?

For DJs, start with genre; for collectors, start with artist. Both work with the same tags; only the template changes. These are our recommendations, not a standard.

LayoutTemplateGood forTrade-off
Genre first{genre}/{albumartist}/{album}/{track} {title}DJs who browse by styleGenre is read per track, so an album whose tracks carry different first genres is split across folders
Artist first{albumartist}/{album} ({year})/{track} {title}Collectors, full-album listeningHarder to see everything of one style
Year first{year}/{albumartist} - {album}/{track} {title}Diggers tracking erasReissues sort under the reissue year
Flat crates{genre}/{artist} - {title}Quick DJ crates of single tracksAlbum context is lost from the path

Use {albumartist} rather than {artist} for album folders. On compilations and split releases, the track artist changes from track to track, which would scatter one album across many folders. The sorter falls back to the track artist when the album artist is empty.

How do I sort my downloads step by step?

  1. Collect. Unzip everything into one folder, for example Music inbox.
  2. Open the sorter and choose that folder. On a library of a few thousand tracks, reading the tags takes seconds because only the tag bytes are read, not the audio.
  3. Pick a template from the table above and set a root folder such as Sorted.
  4. Clean the genres. Look at the genre chips. Add aliases for spellings you want merged (see the genre guide).
  5. Review the plan. Rows marked "file name" or "nothing" had no usable tags; check them first.
  6. Run the script from the folder that contains your inbox. Start with "copy" mode, check the result, then delete the inbox yourself.

What happens to files with no tags?

They are sorted by their file and folder names, or put in an "Unknown" folder if there is nothing to read. The sorter understands two common naming patterns:

File or folder nameRead as
Artist - Album - 01 Title.wavartist, album, track 1, title
folder Artist - Album with file 01 Title.wavartist and album from the folder, track and title from the file
track7.wav in a folder untitledtitle only; goes to Unknown Genre / Unknown Artist / Unknown Album

WAV files are the most common case: the format has no standard place for these tags that every program reads, so many WAV downloads carry their information only in the file name. If a store offers a choice, FLAC keeps the same lossless audio and carries full tags.

Which characters are changed in folder and file names?

To keep paths valid on every common desktop system, the sorter replaces < > : " / \ | ? * and control characters with a space, removes dots and spaces at the start or end of a name, drops empty brackets (for example () when the year is missing), and cuts each folder or file name at 120 characters. If two files end up with the same path, the second one gets (2) added instead of overwriting the first.

How do I keep my library sorted as I buy more music?

Keep one inbox folder for new purchases and run the sorter on it whenever it fills up. Because the script never overwrites and uses the same template, new releases slot into the existing tree.

Can I sort my music on a phone?

You can choose files and see the full plan on a phone, and download the CSV. Running the script needs a desktop terminal, because phone browsers cannot move files on your storage.

Where do these facts come from?

Every statement about tag formats on this page comes from the published format specifications listed here. Advice on folder layouts and genre lists is our own recommendation and is marked as such.