For clarity, regex is all that gobbledy stuff that MrC could speak fluently, something to do with perl, google it to see what I mean. It's very powerful, but also quite hard to get to grips with for most of us (me included).
What we're discussing here are simply called 'expressions' within MC. A small distinction, but important when you're looking for help.
Here's a quote from August last year...
Re: isempty()...
If you imagine asking MC to create a directory structure using [series] without first testing its 'emptiness', and it was empty, MC would be attempting to create a directory with no name, which is not good. For this reason, if the field is actually empty, the rename tool replaces the emptiness with "Unknown [field]", and it does this before handing things over to the expression evaluator, meaning that as far as its concerned, the field is not empty.
You can use the same method to turn this off, ie...
[Media Type]\[Media Sub Type]if(isempty([series,0]),,[series])\if(isempty([album,0]),[name],[album])
You just need to be careful you're not asking MC to create illegal file paths or names, although in my testing, MC appears to gracefully and quietly correct any illegal double backslashes that appear in the new path, so you just lose a level in the path, which might not be what you want, but would be easy to correct.
-marko
So, in your case, you should be using:
If(IsEmpty([AlbumArtist
, 0]),ListItem([Artist],0)\[Album],[Album Artist]\[Album]
)And now some thoughts on this string above:
By default, if you use multiple, semi colon seperated artists in the artist field, when using the rename tool, [artist] will default to the first item in the list without any trickery from the user, MC should just pick the first one and move along.
Also, as BryanC has stated, I'm sure that if you use [album artist (auto)] it does exactly what you appear to be after all on it's own. i.e.: If Album Artist is populated, it will use that value, if not, it will use the first item in the artist field, and if the album has multiple artists, it can be set to use Various by way of the check box you see in the tool itself.
If you have any other questions, please ask, or if the above described behaviour is not what you're seeing, please provide as much detail as possible and we'll try and see if we can see anything else wrong.
EDIT:Just spotted this too: If(IsEmpty([AlbumArtist]....
Is that a typo? or perhaps a custom library field of yours? otherwise, it will fail as the default MC field is [Album Artist]
Regards,
-marko