INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Expression Copy Question  (Read 840 times)

Music_Man

  • Junior Woodchuck
  • **
  • Posts: 68
Expression Copy Question
« on: November 09, 2020, 05:33:19 pm »

Trying to Utilize the Expression Language:
I would like to Append the identical character to the beginning of all my movie's names in the "Name" field.  I created an Expression column in Video/Files Copy and inserted the expression. The Expression did as I wanted. Now, how do I copy each name from the Expression column to the Name column? 
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Expression Copy Question
« Reply #1 on: November 09, 2020, 05:51:12 pm »

Append means put at the end. You don't append at the beginning. Prepend means put at the beginning.

If your expression looks something like this:

A[Name]

(which prepends the character A to what's in the [Name] field)

Then simply edit your Name field, and put in this:

=A[Name]

Logged

Music_Man

  • Junior Woodchuck
  • **
  • Posts: 68
Re: Expression Copy Question
« Reply #2 on: November 09, 2020, 09:07:32 pm »

Thanks Wer!!

I was making it much more difficult than it was, by creating an unnecessary step in the creation of an Expression Column!! 

I've watched the tutorial videos linked to herein.  I've reviewed the Expression help page and read posts about the subject but it's tough finding the basics of where and how to enter an expression.  You just gave me a forehead slapping example -- so simple, but I didn't guess it!  Also, examples of expressions, especially the ones frequently used would be handy.  I've seen folks mention the creation of their own cheat-sheet (if you will) of their most used expressions so they don't have to re-create them each time.  A linked-to compendium of these would be helpful.  I know that MC has the internals to automate most any task in a macro-like fashion.  The devil is finding out what exactly can be done via examples that a neophyte non-programmer can translate for their purposes.  Presenting this in a fashion that the rankest new user could replicate would be important.  For example after much research, I had already landed upon the example provided, =A[Name], but I didn't know what to do with it.... ::) It doesn't get much more basic than that.  But before it was mentioned, I hadn't read or seen where that could be done.  Perhaps it isn't easily found, or it was my oversight...   

Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Expression Copy Question
« Reply #3 on: November 09, 2020, 09:24:35 pm »

I don't think you wasted your time with the expression column.

It is wise to test expressions first in an expression column. It causes no harm, and allows you to try things out to get your expression right.  Once you start typing into the [Name] field, you're re-writing the tags, right or wrong. So be careful.

The JRiver expression language is reasonably well documented. However, it does presume a certain amount of technical sophistication and familiarity with some programming concepts on the part of the reader, so it can be problematic for some people.

Presenting programming concepts to neophytes, as you put it, is a slow, complicated, and tedious business; I know. JRiver doesn't do that kind of documentation. And no one else around here is getting paid for this. So I wouldn't expect such a wondrous guide any time soon. :)   
Logged

Music_Man

  • Junior Woodchuck
  • **
  • Posts: 68
Re: Expression Copy Question
« Reply #4 on: November 09, 2020, 10:46:16 pm »

Oh, I agree, the expression learning was not wasted. 

My technical sophistication is decent, but quite unlike my son's who has a computer science degree and works in IT.  I did learn MS DOS in the early days and went forward learning from there.  So, expressions make sense, as do macro's in other applications.  However, my problem was simply what to do with them within JRiver.  That is, how and where can they help me? 

I realize that many herein are providing help gratis, because they simply want to be helpful and I'm thankful for that.  But that doesn't let the paid staff of JRiver off the hook.  I see that the expression language is documented -- many link to it.  But where is a primer on what comes before that page -- e.g. the why, how and where to use expressions and more importantly, examples of what they actually can do to aid one in automating tagging etc. (as I was trying to do)?  There might be a one, but I haven't found it.  Without your intervention, I'm not sure where I would have found where and how to enter the expression as simple as it was.  And that's too bad, because I would assume many users are missing out on knowing how to, where to, begin tapping MC's vast capabilities that lie just under the surface.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Expression Copy Question
« Reply #5 on: November 10, 2020, 10:34:39 am »

Yes. The wiki is primarily user-created (though JRiver staff do add to it from time to time), and they don't employ any exclusively documentation-focused employees. I suppose that is one of JimH's primary roles, but he does more than that. I do agree that some introductory screen-cast videos or something that cover various features of MC would be wildly useful. Unfortunately, doing that is a LOT of work, and I'm (for example) not able to do it in my "free time".

That all said, this particular feature is documented pretty close to the "top" of the Expression Language page on the Wiki:
https://wiki.jriver.com/index.php/Expression_Language#Field_Assignment

And, anyway, I'm glad you like the feature. I use it constantly, and am still very, very glad for the Liberace Rubber Chicken Build.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Music_Man

  • Junior Woodchuck
  • **
  • Posts: 68
Re: Expression Copy Question
« Reply #6 on: November 10, 2020, 10:14:47 pm »

I must admit that while on the Expression page previously, I hadn't noticed that each Expression linked to examples.  What a faux pas on my part. ::)  These sorts of Expression examples were what I was seeking.  It they were snakes.....well, you know.... ;)

By the way glynor, your posts are always well thought-out and helpful....
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Expression Copy Question
« Reply #7 on: November 10, 2020, 11:00:06 pm »

By the way glynor, your posts are always well thought-out and helpful....

Well, let's not get carried away... ;)   Besides, my avatar photo is cuter!
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Expression Copy Question
« Reply #8 on: November 10, 2020, 11:17:21 pm »

Disagree. Mine has nom noms. Therefore wins.

PS. Steak was amazing. Was on the thinner side though (grocery store has what grocery store has), but definitely FTW. Oh, and stove-top cast iron. We have snow on the deck.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Expression Copy Question
« Reply #9 on: November 10, 2020, 11:33:42 pm »

Nonsense. All my hair is nicely groomed and my tail is well fluffed, whereas you look like a derelict with that hat. A little bit of meat, raw no less, can't make up for that.

Re steak: Good! Now you can tell your friends about the miracle of ancho and garlic. Were the bug eaters envious?
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71470
  • Where did I put my teeth?
Re: Expression Copy Question
« Reply #10 on: November 11, 2020, 07:32:08 am »

Well, let's not get carried away... ;)   Besides, my avatar photo is cuter!
Nuts
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Expression Copy Question
« Reply #11 on: November 11, 2020, 11:16:51 am »

No, for reasons of modesty the photo is discreetly cropped.
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Expression Copy Question
« Reply #12 on: November 11, 2020, 04:24:59 pm »

Nonsense. All my hair is nicely groomed and my tail is well fluffed, whereas you look like a derelict with that hat. A little bit of meat, raw no less, can't make up for that.

Oh please. Everyone knows that squirrels are one-step removed from Pure Evil. Shifty-eyed, twitchy, birdseed stealing little buggers all of them. If you ever met a squirrel the size of a mastiff it'd hunt and kill you if you got near it. And they're so clever, they'd be good at it.

Which is exactly why you chose that avatar, I'm sure.  ;) ;D
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Expression Copy Question
« Reply #13 on: November 11, 2020, 04:33:25 pm »

Nothing but outrageous lies, spread by a man who would quite obviously gnaw the arm off his own mother if she happened to spill garlic butter on it. 
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Expression Copy Question
« Reply #14 on: November 11, 2020, 04:37:22 pm »

I TOLD YOU THAT IN CONFIDENCE!

(And besides, the plastic surgeon says the scars will hardly show in a few short years. And, really, she had it coming. The garlic butter was stupendous.)
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 71470
  • Where did I put my teeth?
Re: Expression Copy Question
« Reply #15 on: November 11, 2020, 05:09:37 pm »

grrr
Logged

Music_Man

  • Junior Woodchuck
  • **
  • Posts: 68
Re: Expression Copy Question
« Reply #16 on: November 20, 2020, 04:14:13 pm »

I've used expressions like =A[Name] discussed above just fine.  But now when I insert it before a name, the name is repeated.  I must have done something different or changed a setting.  But I don't know what?

For Example:
If I type:  =XXX[Name]1941 - The Night Before Christmas
The Result Is:  XXX1941 - The Night Before Christmas1941 - The Night Before Christmas

The same is happening with other expressions.  BTW, as I've previously done successfully, I'm inserting the expression in the Tag box, Name field.  It's also happening in the Files View when I select a file and select to rename it & then insert the expression. 
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Expression Copy Question
« Reply #17 on: November 20, 2020, 05:48:05 pm »


For Example:
If I type:  =XXX[Name]1941 - The Night Before Christmas
The Result Is:  XXX1941 - The Night Before Christmas1941 - The Night Before Christmas

Yes. When you do this, [Name] gets replaced with the current value of [Name] (before the change, if you happen to be applying it to itself.

So, if the file currently has Name: 1941 - The Night Before Christmas
And you paste in =XXX[Name] then, it'd output: XXX1941 - The Night Before Christmas

That's the whole idea. You can select multiple files, and add XXX to the beginning of them, and each one will automatically get its own current value of [Name], modified as desired.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

Music_Man

  • Junior Woodchuck
  • **
  • Posts: 68
Re: Expression Copy Question
« Reply #18 on: November 21, 2020, 10:24:47 am »

Quote
Yes. When you do this, [Name] gets replaced with the current value of [Name] (before the change, if you happen to be applying it to itself.

So, if the file currently has Name: 1941 - The Night Before Christmas
And you paste in =XXX[Name] then, it'd output: XXX1941 - The Night Before Christmas

That's the whole idea. You can select multiple files, and add XXX to the beginning of them, and each one will automatically get its own current value of [Name], modified as desired.

glynor, what you explained is what I was experiencing before yesterday.  That is, what I was expecting was what you said: XXX1941 - The Night Before Christmas.  But yesterday, no matter what I did, I was getting: 
XXX1941 - The Night Before Christmas - The Night Before Christmas

The 2nd. (second): - The Night Before Christmas being my question and problem, NOT the 1st. (first) one!

I tried inserting the expression and a different expression (both had previously worked as you said) dozens of times in multiple files to prevent the 2nd. name duplication from happening.  I cleared the video files and I imported them again.  I exited out of MC and re-started it etc.  Nothing I did, changed the twice name duplication....
Logged

Music_Man

  • Junior Woodchuck
  • **
  • Posts: 68
Re: Expression Copy Question
« Reply #19 on: November 21, 2020, 10:29:44 am »

NOTE: The underline beneath the above second: - The Night Before Christmas was inserted for emphasis ONLY!  It wasn't meant to be the expression's output! 
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8959
Re: Expression Copy Question
« Reply #20 on: November 21, 2020, 10:46:56 am »

I've used expressions like =A[Name] discussed above just fine.  But now when I insert it before a name, the name is repeated.  I must have done something different or changed a setting.  But I don't know what?

For Example:
If I type:  =XXX[Name]1941 - The Night Before Christmas
The Result Is:  XXX1941 - The Night Before Christmas1941 - The Night Before Christmas

The same is happening with other expressions.  BTW, as I've previously done successfully, I'm inserting the expression in the Tag box, Name field.  It's also happening in the Files View when I select a file and select to rename it & then insert the expression. 
MC is returning what you asked for. I've hilighted your error in red in the quote above. You do not need the red text, =xxx[name] is all you need. :)

Music_Man

  • Junior Woodchuck
  • **
  • Posts: 68
Re: Expression Copy Question
« Reply #21 on: November 21, 2020, 12:48:10 pm »

So obvious :-[  If it were a snake....well.... 
Thanks for the hand holding!!
Logged
Pages: [1]   Go Up