INTERACT FORUM

More => Old Versions => Media Center 17 => Topic started by: lowjoel on June 19, 2012, 07:24:30 pm

Title: Fill Properties from Filename - Escapes?
Post by: lowjoel on June 19, 2012, 07:24:30 pm
How do I tell MC to extract file name information when the file name's got a [ or ] character in them? MC thinks it's a tag and refuses to match the filename.
Title: Re: Fill Properties from Filename - Escapes?
Post by: marko on June 20, 2012, 08:36:39 am
Can you give a little more detail regarding what you are seeing exactly?

Without any escaping, it appears to be working OK at this end...
(http://www.theganghut.co.uk/pics/ia/17/Snap-029.jpg)

-marko
Title: Re: Fill Properties from Filename - Escapes?
Post by: lowjoel on June 20, 2012, 08:37:21 am
Try assigning "Love" to a field. I'd do Your [Field name] [, but you'll find that MC ignores the expression.
Title: Re: Fill Properties from Filename - Escapes?
Post by: marko on June 20, 2012, 08:44:30 am
OK, I see what you mean...

You need to use the template method, then break the field down using the existing delimiters. For each word, separated by a space, that you wish to ignore, empty square brackets tell MC to ignore...
(http://www.theganghut.co.uk/pics/ia/17/snap-030.jpg)

-marko
Title: Re: Fill Properties from Filename - Escapes?
Post by: lowjoel on June 20, 2012, 07:49:47 pm
Thanks for that.
Title: Re: Fill Properties from Filename - Escapes?
Post by: lowjoel on June 21, 2012, 08:31:22 pm
Oh, another thing just occurred to me. I don't need it yet, but thinking ahead -- what if I'd like to extract New Mix (without the square brackets?)
Title: Re: Fill Properties from Filename - Escapes?
Post by: marko on June 22, 2012, 12:55:17 am
You would use the square brackets as the delimiter...

(http://www.theganghut.co.uk/pics/ia/17/snap-032.jpg)

If you simply entered [[comment]] into the template, all other fields would remain untouched, and comment would be populated with New Mix

-marko
Title: Re: Fill Properties from Filename - Escapes?
Post by: lowjoel on June 22, 2012, 01:04:09 am
Sweet, I'd remember that.

Gems like these should be somewhere in the Wiki, or is it already?
Title: Re: Fill Properties from Filename - Escapes?
Post by: marko on June 22, 2012, 01:11:44 am
I'm honestly not sure. If you would like to add a page, you are welcome to use the images in this thread if needed.