Skip to content

How to Organize Music Files into Folders using their Tags

A while back I wrote on how to tag music files using their filenames i.e. by extracting title, artist, album and other tag information from their current file names. This is especially useful for those that use music players that rely entirely on the tags to organize your music collection.

While on that topic, I realized some of you may also want to go an extra step further by organizing your music collection into specially formatted folders, e.g into top-level directories of artists and within them their individual album subfolders.

This kind of organization is especially useful if you use folder music players that organize your collection based on the folder structure.

Fortunately, this task while on the outside it seems daunting it can actually be achieved with minimal effort, provided the individual tracks contain the necessary tags. The whole process once automated should only take a few clicks. Let me show you how.

Task and Tools We’ll Need

Task: To move or copy music files into folders and sub-Folders based on their tags, e.g. into individual Album, Artist or Year folders or multiple subfolders like Artist > Year > Album

To do this, we’ll need the following:

  1. Music files that support tags and that already have the relevant tags present (e.g mp3, wma, m4a, aac, flac etc.)
  2. Foobar2000 or TagScanner. I’ll go through both tools, so you can use whichever you are most comfortable with.

1. Organize Music Files into Folders using Foobar2000

Foobar2000 is a little nifty and lightweight music player that also bundles in file tagging operations under its hood. Foobar2000 can also move/copy music files into folders based on their tag information, and that’s what we’ll be using to accomplish this task.

Steps

  1. Launch Foobar2000 and load your music files by dragging and dropping them into the program’s window. You can also go to the File menu and add files or the folder location containing the files.
  2. After adding the files, they’ll be automatically selected. Now just right-click on them and in the context menu select File Operations followed by Move to…. If you prefer copying rather than moving them, select Copy to… instead.
    A screenshot of Foobar2000 main window with files selected.
  3. That will launch the File Operations Setup window. In the Destination folder, select the folder where you want the files to be moved or copied.
    A screenshot of Foobar2000 file operations window.
  4. In the File name pattern box is where the magic happens. By default, you’ll find the placeholder %filename% already added, which stands for the filenames of the music files.
  5. Now depending on the folder structure you want, we’ll have to create a new directory (folder) followed by a placeholder (e.g. Album, Artist). A new directory is specified by a forward slash.

    So for instance if you need to move the music files to their individual Album folders, you’ll first add the Album placeholder which is %album% followed by a slash (/) then the filename placeholder i.e., %album%/%filename%
    A screenshot showing a file operations placeholder.
  6. A real-time preview of the new folder structure we’ll be shown in the preview box whenever you make any changes.
  7. To finish the move/copy process, just click the Run button. The output folder will be opened after the process is complete.

Additional Patterns & Examples

Other placeholders you can use in Foobar2000 include:

  • Artist – %artist%
  • Album Artist – %album artist%
  • Year – %date%
  • Genre – %genre%
  • Title – %title%
  • Track Artist – %track artist% i.e. if Artist is different from Album Artist for specific track
  • Track No. – %tracknumber%
  • Total Tracks – %totaltracks%
  • Disc No. – %discnumber%
  • Bitrate – %bitrate%

For instance, if you need to move the tracks into individual Artist folders, you’ll use: %artist%/%filename%

You can also move the tracks into multiple sub-folders using the same principle – just add the placeholders followed by a slash.

For instance, if you need to move the tracks into their Artist folders then into their individual Album folders, you’ll use: %artist%/%album%/%filename%.

A screenshot of Foobar2000 showing a multifolder file operation.

For the structure Artist > Year > Album, you’ll use: %artist%/%date%/%album%/%filename%

For Genre > Artist > Year > Album: %genre%/%artist%/%date%/%album%/%filename%

If you’re a DJ and want to sort your tracks into folders according to their bitrates (bpm), then: %bitrate%/%filename%

I think you get the idea by now.

2. Organize Music Files into Folders using TagScanner

TagScanner is a very versatile music tagging tool that allows you to do more than just tagging music files. It uses a non-standard interface and can be quite overwhelming at first use, but don’t let that turn you away.

If it proves to be quite difficult to use, it’s probably wise to just stick with Foobar2000.

Assuming your target music files are appropriately tagged, let’s see how we can use it to move/copy music files into particular folders.

Steps

  1. Launch TagScanner and select the RENAME tab.
  2. Add all the files that you need to move or copy to particular folders by dragging and dropping them into the program’s window. You can also use the menu option to add the folder(s) with the music files.
    A screenshot of Tagscanner Rename tab with files added.
  3. On the right sidebar, just below the Placeholders & functions section, tick that checkmark that says Reorganize files and on its right select move or copy if you want to retain the files in their original folders.
    A screenshot showing Tagscanner's placeholder & functions panel.
  4. Just below that, under Destination folder, select the root folder (top most folder) where you want the files to be moved.
  5. With the root folder set, go to the Filename pattern section and add the placeholders in the format which your music files appear. Use the quick preview just below the filename box to confirm the patterns match.
    For instance, for:
    Iron Maiden – Aces High use %artist% - %title%
    01- Iron Maiden – Aces High use %track% - %artist% - %title%
    Iron Maiden – 01 – Aces High use %artist% - %track% - %title%
    The drop-down arrow has some predefined patterns that you can also use.

    A screenshot showing a file name pattern in Tagscanner.
  6. Now decide the folder structure that you need. For instance, if you want all the music files to be moved into their individual Artist folders, you’ll just have to add backslash (\) followed by the artist placeholder (%artist%) to the above filename placeholders. i.e. %artist% - %track% - %title% becomes %artist%\%artist% - %track% - %title%
    A screenshot showing a filename pattern preview.
  7. Click the preview button to check the output structure then click the rename button to complete the moving/copying process.

TIPS

  • Make sure to include or omit the spaces as they appear in the filenames.
  • You can do while renaming the files themselves so that it renames and moves the file in one go.

Additional Patterns & Examples

Other placeholders you can use in Tagscanner include:

  • Artist – %artist%
  • Album – %album%
  • Album Artist – %albumartist%
  • Year – %year%
  • Genre – %genre%
  • Composer – %composer%
  • Track No. – %track%
  • Total Tracks – %totaltracks%
  • Disc No. – %disc%
  • Total Discs – %totaldiscs%
  • Bitrate – %bpm%
  • Publisher – %publisher%

To move or copy the files to individual Albums folders use: %album%\%artist% - %track% - %title%

To move into multiple subfolders such as Artist > Album use: %artist%%album%%artist% - %track% - %title%

For Artist > Album > Year use: %artist%%album%%year%%artist% - %track% - %title%

An image showing a multifolder pattern
Moving to Multiple Subfolders

Hopefully, you get the idea by now.

Share:

6 Comments

  1. Thanks for this. FooBar2000 let me recover from iTunes ravaging my music library. I was excited to see that there is a Mac version, but it lacked any of the file renaming and moving features. Fortunately the Windows version ran just fine under Parallels. Thanks again!

  2. Four years after the article was published, and I thought I would let you know that this was a huge help! All my music was jumbled into a few folders, but Plex is horrible unless all music is sorted into folders by artist. Foobar made it a snap to do this. Thank you!

    1. Kelvin Administrator

      You’re most welcome Kevin! I had the same problem with my music folders back then and Foobar was a great help indeed.

Leave a Reply

Feel free to share your comments or questions with me. I may not be able to respond immediately so please check later once I've approved your comment.

Your email address will not be published. Required fields are marked *

Kelvin Kathia

Kelvin Kathia is a writer that's passionate about sharing solutions to everyday tech problems. He's the founder and editor of Journey Bytes, a tech blog and web design agency. Feel free to leave him comments or questions regarding this post, or by leaving him a message on the contact page. If you found his content helpful, a donation is much appreciated.