INTERACT FORUM
More => Old Versions => Media Center 13 (Development Ended) => Topic started by: lise on February 11, 2009, 12:46:41 pm
-
I am trying to create a renaming expression for all music files, but I'm having an issue with my directory expression. I've read everything I could find in the wiki and the forum, but I can't figure out what is wrong with my expression.
The result I want:
If the album field is empty, create an Artist folder, otherwise create Artist\album folders.
My rule:
If(IsEmpty([Album]),[Artist],[Artist]\[Album])
It turns out that the first [Artist] field is just always being ignored, album or no album.
If there is no album, I get: B52s\Unknown Album\
If there is an album, I get: B52s\Roam\
I know that the first [Artist] is being ignored, because when I replace it with [Genre], the results are the same (ie no genre shows up when there is no album).
I get the exact same result if I use
If(IsEqual([Album],[],8),[Artist],[Artist]\[Album])
I've created a number of other expressions that work. What am I doing wrong with this one?
-
i did not test it lise, but have you tried
If(IsEmpty([Album]),[Artist],[Artist]\\[Album])
:)
gab
-
Hey gab,
Yup, tried that. Same result.
Because your suggestion merely added a "\" before the final [album] in my expression, can I assume that the basic structure of my expression is correct and should work, ie
If the album is empty create an Artist folder If(IsEmpty([album]),[Artist],
otherwise create Artist\Album folders [Artist[\[Album])
-
actually i thought it was right. the "\"trick is the first thing i always try when something does not work. the second one, and i just tested it, is to set a ,0 in the field that does not work. so
If(IsEmpty([Album,0]),[Artist],[Artist]\[Album])
does what you want as far as i see. i think the ',0 give the clean value, or something like that. learned long time ago, forgot what it did.
:)
gab
-
you could also use: if(isequal([album],unknown,8),[artist],[artist]\[album])
empty fields are always translated to "Unknown Field" when using the renaming tool.
-marko
-
Thanks gab. That did the trick.
I had tried adding 0s and 1s but couldn't get it to work. I thought I was following the wiki for IsEmpty:
Examples:
IsEmpty([Artist])
IsEmpty([Duration], 1)
by typing if(IsEmpty([Album],0) (doesn't work)
Your expression: If(IsEmpty([Album,0]) does work, so many thanks. I've been at this for hours!
-
and what did the ,0 again marco? it could be only you who told me once. 8)
:)
gab
edit: great it worked lise, i think this part is still wikiless
-
you could also use: if(isequal([album],unknown,8),[artist],[artist]\[album])
empty fields are always translated to "Unknown Field" when using the renaming tool.
-marko
Thanks marko. I didn't know I could look for 'unknown' rather than empty.
-
some seriously rapid editing going on in this thread, LOL :D
gappie,
It tells the expression editor to use the raw field data without any formatting.
-
some seriously rapid editing going on in this thread, LOL :D
gappie,
It tells the expression editor to use the raw field data without any formatting.
ill stop now 8). not used that threads go that quick. can type, think it over edit and reedit to take away the typos, and if i read the post right i reacted to ;) before anybody reads. thanks. marco.. that was it. the raw data, so not filling in the unknown from your expression....
:)
gab
edit: just did a few