INTERACT FORUM

Please login or register.

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

Author Topic: help with editing tag  (Read 2315 times)

jondavis

  • World Citizen
  • ***
  • Posts: 132
help with editing tag
« on: November 10, 2015, 02:09:51 pm »

Trying to change the tag name of like 50 files at once
All of them start with like the track and the name in the name field
E01 Foreward
E02 Prologue
etc....
So I want to delete the E01, E02, E03 etc from the name field
How would I do that
It comes up as [Varies] when you look at the tag info.

...
And is there a formula that would change all field properties from like lower to uppercase.
Like
harry potter
to
Harry Potter
and at the same time change
star wars
to
Star Wars

Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72439
  • Where did I put my teeth?
Re: help with editing tag
« Reply #1 on: November 10, 2015, 02:57:39 pm »

Please take a look at MC's Library Tools.

Find and Replace

Title Case.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: help with editing tag
« Reply #2 on: November 10, 2015, 04:06:28 pm »

You can definitely use expressions to do things like this.  When you select many songs at once and you see "varies", you can put expressions in place of that, and it will change all of them at once.  You just have to be sure your expression is right!

For example, you can uppercase all words in the Name field with:

=fixcase([Name],1)

You would paste the above expression into the Name field in the Tagging window on the left, with one or more songs selected and it would change them all at once.

It can also do "title case" as Jim indicated.  Here are the docs on it:

http://wiki.jriver.com/index.php/Expression_Language#FixCase.28.E2.80.A6.29:_Changes_the_case_of_a_given_string

For your project to remove the leading numbers from the name field, is it always 4 characters?  In your example it's 1 letter, 2 numbers, and then a space.  Do the number of characters vary?  If not, there are simple expressions to trim characters.  If they vary, it gets harder, but we can probably help you with that.

Be careful working with expressions.  Check your work and use UNDO as soon as possible if you make a mistake.  It's probably also a good idea to make a database backup before you start.  File > Library > Backup library.

Brian.
Logged

jondavis

  • World Citizen
  • ***
  • Posts: 132
Re: help with editing tag
« Reply #3 on: November 10, 2015, 07:00:25 pm »

Ok , understanding how to make letters uppercase now
Still working on how to remove parts of the name field
Logged

jondavis

  • World Citizen
  • ***
  • Posts: 132
Re: help with editing tag
« Reply #4 on: November 10, 2015, 07:21:04 pm »

I think I got it
using this now
=removeleft([Name], 4)

which removes everything at the beginning of the name up to how ever many characters you use for the value

now to see if I can pull the number off the name and put it in the track number field

not sure if this is the best way to do it but seems to work
mid takes whats in the middle of your string.
so it's taking the 5th and 6th character in the string and uses that for the number.
name is: EJWEC14
EJWEC14
0123456

=mid([name] ,5,6)
Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: help with editing tag
« Reply #5 on: November 10, 2015, 07:56:43 pm »

now to see if I can pull the number off the name and put it in the track number field

Well, you can do that, and I'll explain, but before I do, I think there might be a better way.

If the details you are trying to parse out of [Name] already exist in the filenames (on disk) of the files, then you don't need to do it this way at all. Instead, you can have MC parse metadata out of the filenames with the Fill Properties from Filename tool. The article about this on the Wiki is a stub, but there's a link to a thread where I explain it pretty thoroughly:
http://wiki.jriver.com/index.php/Fill_Properties_from_Filename

Basically, you can tell MC to parse the details out of the filename (including, or not including, folder names as is needed) to extract the metadata tags from the file and folder naming structure. It can set a whole bunch of different tags all at once, and it automatically cleans up the values a bit too. So read that.

If you need to "split" a [Name] tag like that, and the [Track #] and real [Name] are in the filenames, it'll be easier to split them with that tool. Even if they aren't already in the filenames (they came from embedded tags) then you can still do it, by first making the filenames contain the current [Name] field with the Rename, Move, and Copy Files tool (which does have a good wiki article).

So, if you have a bunch of these, even if the stuff you need isn't already in the filename, you can just "push" the current [Name] field contents into the filename somewhere (with Rename, Move, and Copy Files) and then do Fill Properties from Filename. Based on your example, though, I suspect the stuff you need is already in the filename.

So... That all said, you can move values from one field to another in two ways:

1. Select the files and right-click and choose Library Tools > Move / Copy Fields. This lets you move, or copy, values in full from one field to another. Then, you can (if needed) massage those results in place.

2. Or, you can do it directly.  You're editing the [Name] field and then inserting =removeleft([Name], 4).  That sets the current value of the [Name] field to the results of the expression you entered (make it "equal to" the output of this expression, hence the equals sign).  But, there's no reason you have to use that to edit the [Name] field, it'll work on any field.  For example, you could edit the [Comments] field and insert that same thing, and then the value from [Name] would be copied, modified, into the [Comments] field.

Or, if you wanted to copy the rightmost 2 characters from the [Name] field into the [Tract #] field, you could edit the [Track #] field and insert:
=Left([Name], 2). That would copy the leftmost 2 characters from the [Name] field into whatever field you're currently editing.

But, if you're going to do this, you should also clean it to strip out leading zeros, which might be ugly.  PadNumber() can be used for this. If you provide a digit after PadNumber() it will increase padding (add leading zeroes where needed to make it always result in the same number of digits). If you use PadNumber([Some Value], 0) it pads it to the minimum number of digits.  So this would do it:
=PadNumber(Left([Name], 2), 0)

That will copy the first two digits of the [Name] field over to whatever field you're currently editing, and make sure it clears any unnecessary leading zeroes.
Logged
"Some cultures are defined by their relationship to cheese."

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

jondavis

  • World Citizen
  • ***
  • Posts: 132
Re: help with editing tag
« Reply #6 on: November 10, 2015, 08:37:03 pm »

Thanks, I'll take a look, got a ton files I want to fix the tags for
Logged
Pages: [1]   Go Up