Seeking someone to write a filenaming script for me

Hi all,
I’ve decided that I’m really not too crash hot on this filenaming thing. I’ve had a few goes but I think the complexity of my needs outweighs my ability.
I’ve converted from QMP, in which I was able to build a few different filenaming templates, and I could alternate between these in the filenaming window on the fly. In MBP, I can only store one. Rather than having a few saved in notepad and have to copy and paste into the options window before I save, and then change back, I want one all-singing, all-dancing script to do the lot!

I name all my files with Album, track number (preceded by disc number if there is one) and Title - unless it’s a non-album track, then I just use Artist and Title.
Then they’re filed by \Album Artist(year) Album\ - chronologically - unless they’re soundtracks which are filed in \Soundtrack\Album (year)\ - alphabetically - or just \Artist\ for the odds and sods.

I have been trying to write something that does this:

If ‘release type’ contains “soundtrack” file in \Soundtrack\Album Name (originalyear);
If ‘album’ is “[non-album track]”, file in \Artist;
else file in \Album Artist(originalyear) Album Name.

and

file name is Album Name - Track# - Title; or
file name is Album Name - Disc#_Track# - Title; else
file name is Artist - Title.

I only change album artist when it starts with “The”, leaving the rest by firstname lastname, full band name, or various artists as they come in from the scan.

My library looks like this:
Single Disc Albums …\Beatles, The(1965) Help\Help - 07 - Ticket To Ride.mp3
Multi Disc Albums …\Billy Joel(1985) Greatest Hits\Greatest Hits - 2_02 - Big Shot.mp3
Non-album odd tracks …\Connie Francis\Connie Francis - Lipstick on your Collar.mp3
Soundtracks …\Soundtrack\Moulin Rouge (2001)\Moulin Rouge - 12 - El tango de Roxanne.mp3

Thanks in advance.

Give this a try and see if it gets close to what you want:

$if($inmulti(%releasetype%,single),$delprefix(%artist%)/%artist% - %title%,$if($inmulti(%releasetype%,soundtrack),Soundtrack/%album% \(%originalyear%\),$delprefix(%albumartist%) \(%originalyear%\) %album%)/%album% - $if($gt(%totaldiscs%,1),%discnumber%_,)$num(%tracknumber%,2) - %title%)

It may require a bit of tweaking around the $delprefix() parts to exactly match your preferences.

Thanks, it’s definitely a great start!!

It’s not putting a \ into the path between Album Artist and (originalyear)…
and I’ve just realised that I have missed that in my post (how the hell did I do that - twice!!)

it should have read
Single Disc Albums …\Beatles, The\ (1965) Help\Help - 07 - Ticket To Ride.mp3
Multi Disc Albums …\Billy Joel\ (1985) Greatest Hits\Greatest Hits - 2_02 - Big Shot.mp3

I had to edit and put a space after the " \ " to get them to show!
Ooops

Here is the revised version:

$if($inmulti(%releasetype%,single),$delprefix(%artist%)/%artist% - %title%,$if($inmulti(%releasetype%,soundtrack),Soundtrack/%album% \(%originalyear%\),$delprefix(%albumartist%)/\(%originalyear%\) %album%)/%album% - $if($gt(%totaldiscs%,1),%discnumber%_,)$num(%tracknumber%,2) - %title%$if($or($ne(%albumartist%,%artist%),$inmulti(%releasetype%,soundtrack)), [%artist%],))

On this one, I also included the track artist name in the file name if it was different from the album artist (such as you’d see on a “Various Artists” album), or if it was a soundtrack.