INTERACT FORUM

Please login or register.

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

Author Topic: Display Files that need to be changed - Fixcase  (Read 994 times)

mvandyke

  • World Citizen
  • ***
  • Posts: 159
Display Files that need to be changed - Fixcase
« on: November 26, 2019, 08:45:29 am »

I have a rather large library and would like to display files that would require a fixcase (either all in lower case) or in UPPER CASE.  I've used the Clean File Property's extensively but it's hard to search through 10's of thousands of files.

Is their an expression or trick to display lower case or upper case fields?

Thanks
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42444
  • Shoes gone again!
Re: Display Files that need to be changed - Fixcase
« Reply #1 on: November 26, 2019, 08:47:45 am »

Sure thing.  This expression will show the name in all upper-case:
FixCase([Name], 3)

Lower-case and other fields should follow along.
Logged
Matt Ashland, JRiver Media Center

mvandyke

  • World Citizen
  • ***
  • Posts: 159
Re: Display Files that need to be changed - Fixcase
« Reply #2 on: November 26, 2019, 09:16:10 am »

Thanks Matt for the quick turnaround.  What is the best way to leverage this expression to show only files that have names in UPPERCASE.  I tried adding it a display field but that didn't seem to work.

I'm a long time JR user but getting more involved in fixing metadata now.  I've spent a lot of time searching for this in the support forum but unable to locate a fix.

Thanks
Matt
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42444
  • Shoes gone again!
Re: Display Files that need to be changed - Fixcase
« Reply #3 on: November 26, 2019, 09:27:38 am »

There's a IsLowerCase(...) function, but I don't think there is an IsUpperCase function.  I could add it to MC26.
Logged
Matt Ashland, JRiver Media Center

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42444
  • Shoes gone again!
Re: Display Files that need to be changed - Fixcase
« Reply #4 on: November 26, 2019, 09:44:40 am »

I just got done adding it to MC26.  Thanks for the suggestion.
Logged
Matt Ashland, JRiver Media Center

Moe

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 718
  • Hi
Re: Display Files that need to be changed - Fixcase
« Reply #5 on: November 26, 2019, 10:34:18 am »

This isn't perfect, but this expression will find any file that has three capital letters in a row in the name field

Code: [Select]
ifelse(regex([name], /#^[A-Z]{3,}#/, 0, 1), Fix your case!)
If you want to change it from three letters in a row to a different number, change this bit of the expression {3,}

This should find all tracks that don't have a capital letter in the name

Code: [Select]
if(regex([name], /#^[0-9,A-Z]{1}#/, 0, 1),,all lower)
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Display Files that need to be changed - Fixcase
« Reply #6 on: November 26, 2019, 02:45:28 pm »

Building on Moe's concept.  Here's a regex that should find most all uppercase [Name] fields (song titles):

Code: [Select]
ifelse(regex([name], /#^[A-Z0-9 \.\+\?\&\(\)\$\#]+$}#/, 0, 1), Fix your case!)
If your song titles contain special characters that I have not accounted for, like the @ or " or ' (for example) then my expression won't work.  As a side effect, it's also going to detect song names with only special characters and ONLY numbers or combinations of these three.  But it should still be useful.

Change the expression so that A-Z becomes a-z and it will detect the same thing, but in all lowercase.

Brian.
Logged

Moe

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 718
  • Hi
Re: Display Files that need to be changed - Fixcase
« Reply #7 on: November 26, 2019, 03:34:24 pm »

Brian, you've got an extra } in there.  It should read

Code: [Select]
ifelse(regex([name], /#^[A-Z0-9 \.\+\?\&\(\)\$\#]+$#/, 0, 1), Fix your case!)
Logged

mvandyke

  • World Citizen
  • ***
  • Posts: 159
Re: Display Files that need to be changed - Fixcase
« Reply #8 on: November 26, 2019, 04:21:08 pm »

That works.  Thanks to all for your help.

Matt
Logged

Moe

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 718
  • Hi
Re: Display Files that need to be changed - Fixcase
« Reply #9 on: November 26, 2019, 09:24:46 pm »

This could get distilled all the way down to

Code: [Select]
ifelse(regex([name], /#^[-A-Z\d\s_.+?&()$#]+$#/, 0, 1), Fix your case!)
(Sorry, still trying to improve my regex skills and this was an interesting exercise :))
Logged
Pages: [1]   Go Up