Button to select files with same first 5 or so characters?

I have a lot of mp3 files on my computer; almost all of the filenames begin with the artist, followed by the track. Seeing as I put all new mp3 files in one folder before I sort them into different folders, the files tend to get jumbled up because I sort them by date/time accessed. I'm wondering, is it possible to make a button that selects all the files with the same first 5 or so characters so that I can immediately have all mp3 files by the same artist selected and ready to copy/move into another folder?

The current method I use is to sort the files by name, then select all the files by the same artist, and then move them where I want. I think it would be much easier and efficient to have a button that simply selects all the files in a folder that have the same first 5 or so characters. A button such as this could also be useful when sorting TV shows or other files that begin with something like "lost.s05e04.avi". All files beginning with "lost.s05" would be selected and pertain to the same season (in this example you would have to have the first 8 characters selected).

I currently have a button that selects all files in the folder with the same extension:


I'm not sure how to transform this button to achieve my intended functionality. Any ideas?

If the music files are tagged then you can make Opus automatically sort them into folders for you:

See HOW TO: Rename or move music files based on MP3 tags and also Various simple rename presets.

Thanks for the tip Leo :smiley:. I usually use a tag editor to clean up the Id3 tags, but I tend to do this after the files have been sorted into their respective folders. The button that I mentioned could be useful in other situations too, like the TV show example I gave. In many cases files that need to be grouped together often begin with the same first 5-10 characters (or perhaps that's just the way I tend to name my files).

Another example in which this button could be used would be when you're organizing photos. When I initially dump all the photos in my camera on my computer, I tend to rename them immediately, the filename usually starting with the place or event like "anniversary". It would be really useful to just press a button and have similar files selected no matter what the sort order is. I don't have the slightest clue as to if and how this could be accomplished. I've taken another look at the raw commands and just can't find anything that I could even experiment with.