How to Sort Music Files into Folders Using their Tags

tags folder

A while back I wrote on how to tag multiple music files from their filenames in batch i.e.  title, artist, album etc. info using the format present in the filename. This is especially useful if you want to keep your music organized and/or use a music player or organizer that relies on tags to sort your music. If you get your music from online sources, which often have either these tags missing or are incorrect, this can be quite a lifesaver.

While on that topic, I thought it would be a great idea to also show you how you can automatically sort your music files into specific folders after tagging them. This can be done quite easily using the same principle in the aforementioned post, so if you've already gone through that post, this should be pretty straightforward. If you use folder player instead of the typical tag-dependent players, this can be quite useful for you needs.



Task:
Move or copy music files into Folders and/or Sub-Folders based on the info in their tags e.g. into individual Album, Artist or Year folders or multiple subfolders like Artist>>Year>>Album

What we need:
  • Music files (*.mp3, *.wma, *.m4a *.aac etc.) that have the relevant tags present
  • Foobar2000 or TagScanner. We'll go through both tools, so you can use whichever your most comfortable with.


A. 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:

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.
add
Add Files (click-to-enlarge)

3. A small window will pop up. In the Destination folder, select the Folder where the files will be moved/copied.
destination
Select Destination Folder (click-to-enlarge)

4. Under File name pattern is where the magic happens. By default, you'll find the placeholder %filename% already included which stands for the filenames of the music files.
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 backslash.

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 backslash (/) then the filename placeholder i.e.
%album%/%filename%
album folder
Moving to Album Folder

A realtime preview of the new folder structure we'll be shown in the preview box when you make any changes.

Other placeholders which you may want to use 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 it will be:
%artist%/%filename%

You can also move the tracks into multiple sub-folders using the same principle - just add the placeholders followed by a backslash. For instance, if you need to move the tracks into the Artist then specific Album folders, it will be:
%artist%/%album%/%filename%

For Artist > Year > Album:
%artist%/%date%/%album%/%filename%
artist date album
Moving into Multiple Sub-folders

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

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

I think you get the idea by now.

5. To finish the move/copy process, just click the Run button. The output folder will be opened after the process is complete.



B. 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:


1. Launch TagScanner and select the first tab - the RENAMER 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.
add files
Add Music Files

2. On the right sidebar, just below the Placeholders & functions section, tick that checkmark that says Reorganize files and on its right select move. Select copy if you need to retain them in their original folders.
reorganize
Tick Reorganize Files

3. Just below that, under Destination folder, select the root folder (top most folder) where you want the files to be moved.

4. With the root folder set, go to the Filename pattern section and add the placeholders in the format which your music files appear. For instance, for:
Iron Maiden - Aces High >>> %artist% - %title%
01- Iron Maiden - Aces High >>> %track% - %artist% - %title%
Iron Maiden - 01 - Aces High >>> %artist% - %track% - %title%

filename
Enter Filename Pattern

TIPS
  • The drop arrow has some predefined patterns for you to use
  • Use the quick preview just below the filename box to confirm the patterns match.

5. Now decide the folder structure that you need. For instance if you need all the music files to be moved into their individual Artist Folders, you'll just have to add a backslash (/) followed by the artist placeholder (%artist%) to the above filename placeholders. i.e.
%artist% - %track% - %title% >>> %artist%\%artist% - %track% - %title%
artist folder
Moving to Arist Folder

To individual Albums Folders it'll be:
%album%\%artist% - %track% - %title%

To Multiple Subfolders:
Artist > Album:
%artist%\%album%\%artist% - %track% - %title%

Artist > Album > Year:
%artist%\%album%\%year%\%artist% - %track% - %title%
subfolders
Moving to Multiple Subfolders

Hopefully, you get the idea.

Other placeholders you may need 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%

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

6. Click the preview button to check the output structure then click the rename button to complete the moving/copying process.


Leave your comment below. Spammers are advised to file a missing comment report in not less than a weeks time.