INTERACT FORUM

Please login or register.

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

Author Topic: Rename move copy - capitalization of word  (Read 1457 times)

The Big Labinski

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 442
  • Wake up and slow down
Rename move copy - capitalization of word
« on: January 06, 2018, 01:22:08 pm »

All my fields and filenames have all words with capitals.

Also under tool - general - disc lookup capitalization: upper case every word  - itīs set in this way.

Rename, move, copy "F6" - when i use this tool now some words get lowercase again.

Has anybody an idea how it get all words capitalized withe the F6 tool as well.
Logged
Wake up and slow down 😴

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Rename move copy - capitalization of word
« Reply #1 on: January 06, 2018, 05:56:39 pm »

Hmmm, I thought the Rename, Move, & Copy Files function used Title Case for its output. There have been some changes to that function recently. Maybe something was missed. Or maybe it always did that, just using the source tag capitalisation for the output?

But you are saying that the source tags used for the RM&CF function already have the correct capitalisation, and the output gives you lower case? I'm not seeing that. I'm seeing that the capitalisation used in the tags is used in the RM&CF output, whether all lower case, all UPPER CASE, or Title Case. At least when testing using the [Name] tag.


But you can fix the problem, if what you have described is actually happening, using the FixCase() expression. Here is an example.

I usually put my movies in a directory that is named using the [Name] and [Year] tags. i.e. For the film "Star Wars: The Last Jedi" released in 2017, [Name]="Star Wars: The Last Jedi" and [Year]=2017)

I can usually just use an expression in the F6 Directory Rule of: [Name] ([Year]). This will output a directory name of "/Star Wars_ The Last Jedi (2017)/", where the ":" is replaced with an underscore "_"as it isn't valid in a directory name.


But if the [Name] tag is actually "star wars: the last jedi" and I don't fix it before running the F6 function, I need to fix it with an expression in the F6 function. This gets a little complex because of the mixed field types.

The [Name] tag is a string field, while the [Year] tag is an integer field, and the () are strings but could also be part of an expression. MC handles the mixed field types in the above simple expression and correctly outputs "/Star Wars_ The Last Jedi (2017)/", but when I start using Expression Functions in the F6 Directory Rule, I need to manage the data type a bit.

The expression I need to use is:
FixCase([name] ([year]&datatype=[string]/), 1)

First, the "FixCase" function will fix the case of the string being produced. It is in the form FixCase(string, 1), where 1 means Title Case. See https://wiki.jriver.com/index.php/String_Manipulation_Functions#FixCase

[Name], being a string, can be left as it is inside the FixCase function. The first "(" is also treated by MC as a part of a string. So the first part of the string inside the FixCase function is "[Name] (".

[Year], being an integer, needs to be converted to a string. This is done by adding the "&datatype=[string]" function immediately after the tag. See https://wiki.jriver.com/index.php/Expression_Language

Now I need to add a ")" to the right of the year value, but the FixCase expression is waiting for a close function bracket, so I can't just add a bracket ")". I need to tell MC that this ")" is to be used as text, and not a close function bracket. I use the Escape Character to do that, "/". So I add "/)" after the datatype function.

Then I finish the FixCase function by separating the string to be use from the mode to use with a ", ", then a ")" to close the function, ", 1)".


Easy huh?
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

The Big Labinski

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 442
  • Wake up and slow down
Re: Rename move copy - capitalization of word
« Reply #2 on: January 07, 2018, 01:05:42 pm »

WOW RoderickGI, first of all many thanks for your very detailed reply.

This was exactly what I was looking for.
AND I learned a lot about expressions from your side.

Many Many Thanks  :) ;) :D
Logged
Wake up and slow down 😴

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Rename move copy - capitalization of word
« Reply #3 on: January 07, 2018, 03:11:27 pm »

You're welcome TBL.  :D

I write up solutions like that so all readers can make sense of it, and perhaps learn a bit about MC. Plus when I forget how to do something, I can search for my own posts!  ;D

I'm still not sure if something is broken in F6 given your original problem. But as don't see capitalisation changed to lower case, I can't really check anything. I don't know of any setting that would cause that behaviour. Maybe someone else can check what happens on their system.

Anyway, problem solved. Enjoy!
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

The Big Labinski

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 442
  • Wake up and slow down
Re: Rename move copy - capitalization of word
« Reply #4 on: January 08, 2018, 03:37:07 am »

Dear RoderickGI, yes you are right.
There is a change in the F6 behavior with capitals.
In older versions everything went fine with this tool.

Maybe some of the administrators can check this as well.

TC

Stefan
Logged
Wake up and slow down 😴
Pages: [1]   Go Up