Hi All,
I'm trying to create an expression for renaming and relocating files based on the pre-set:
[Artist] - [Album] - [Disc #]-[Track #] - [Name]
I'm attempting to modify it so that if any of the elements are missing that part of the filename is excluded. For example, If I don't know the album name, then file name would be:
[Artist] - [Disc #]-[Track #] - [Name]
etc. etc.
I've, so far, prepared the following expression which almost works as I would like it to:
if(IsEmpty([Artist]),,[Artist]) if(IsEqual([Album],unknown,8),,- [Album]) If(IsEmpty([Disc #],1),,- [Disc #])If(IsEmpty([Track #],1),,- [Track #]) If(IsEmpty([Name]),, - [Name])
The problem with this expression is the "spaces" (which I'll represent as " "). In the above example, if an field is empty the " " between each if statements is still entered into the expression. This has the effect of inserting a number of spaces between fields. For Example, if the Album, Disc # and Track # are missing, the file name would be:
[Artist] - [Name]
If I remove the space between each "if" statement, no space is put between the "-" and the next element. And a " " put before the "-" in each expression isn't recognised.
Has anyone attempted to resolve this issue and can assist? Or does anyone know how to represent a space character rather than a " " to put before the "-"
Any assistance would be greatly appreciated