Sorting in different folders by file type

Tags: #<Tag:0x00007fe315c64cb0>

I would like to sort my music by Extension, Artist, Album, Track. So I have a MP3, Wav, M4A and so on root folders then Artist, Album, Track.

I would like each file to be renamed, Artist, Album, track when it is moved.

Would someone mind writing a script for this I would greatly appreciate it.
Thanks in advance

That’s pretty much the default script. So the default will give you albumartist/album/tracknumber tracktitle

$if($gt(%totaldiscs%,1),%discnumber%-,)$if($and(%albumartist%,%tracknumber%),$num(%tracknumber%,2) ,)$if(%_multiartist%,%artist% - ,)%title%

It will also add the discnumber if it is more than one. It has some other specialities, such as creating the album folder only if there is an album artist, and setting the artist name in front of the track title if the album contains tracks from different artists. If you don’t want this all and really just albumartist/album/tracktitle then you could reduce it to:


Nice and simple. Now for the file extension there is a variable %_extension%. To have a folder with the extension name just add it to the beginning of the script separated by a slash for the folder separator:


For consistency, I would probably write this as:


to avoid potentially creating multiple directories on case-sensitive file systems.


Thank you both. At the moment I have a greater problem. The program crashes often. With the default script.

Can you be more specific when exactly it is crashing?

We are also preparing the next release of Picard and have fixed a couple of potential crashes there. I have uploaded a current development build on:

Could you check whether this solved your issue?

If this does not solve you issue, could you report details on a crash by running Picard from command line with the “-d” command line option, make the application crash and post the output on the command line here?

If you are on Windows, make sure you have installed Picard using the installer. Then open a Windows command prompt and start Picard with:

"C:\Program Files\MusicBrainz Picard\picard.exe" -d

It would be great if we could address the crash your experience in time for the next release.

1 Like

I will gladly. However my personal time is very limited. It is why I didn’t sit learn the script language. It may be a few days before I can post again.


1 Like